Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 04 Feb 2003 @ 04:55:24 GMT


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


Subj:   Re: How to pass external arguements to mload script
 
From:   McCall, Glenn D

In answer to your question about setting environmental variables (envirables) from perl you can use:

$ENV{"VAR_NAME"} = "SOME value";


Or to access an envirable, try

Print "PATH=" . $ENV{"PATH"} . "\n";


Will print the contents of the PATH envirable.

On your approach, I fully support Dwight's response 29/1/03 to run mload as a sub task from your perl script. We use this all the time for bteq, fexp and all sorts of utilities and it works great.

You can also use print statements if you need some perl code to generate script commands or you have a need to mix some perl processing with the generation of script commands.

For example

For ($i=1; $i <= 10; $i++) {
print ipipe ".field col$i char(5)\n";
}


Will generate 10 field statements for columns 1 through 10.

Perl is great !


Good Luck



     
  <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: 15 Jun 2023