Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 29 Jan 2003 @ 01:41:58 GMT

  <Prev Next>   <<First <Prev Next> Last>>  

Subj:   Re: How to pass external arguements to mload script
From:   Dwight Etheridge

If you put your mload commands instream in perl with a heredoc piping mechanism, you can do all the symbolic substitutions you want. The following chunk of code can be wrapped in a loop to process many, many files via sequential invokations of mload. All the $vars here are simple perl variables.

open(ipipe, "| mload ");
print ipipe < .logon dbc,xyz
.logtable $opt_d$lt;
.begin mload tables $opt_d
worktables $opt_d$wt errortables $opt_d$et $opt_d$uv
checkpoint 5000000 errlimit 1 ;
.layout CPTDLAY indicators;
.table $opt_d;
.dml label CPTDML;
insert into $opt_d.* ;
.import infile $opt_t/$opt_s.exp format fastload layout CPTDLAY apply
.end mload;
close ipipe;

Dwight Etheridge
Teradata Certified Master

  <Prev Next>   <<First <Prev Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020