Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Jan 2003 @ 23:44:35 GMT


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


Subj:   Re: How to pass external arguements to mload script
 
From:   Sajid Chida

  IF this is in Windows environment use the 'ACcept Var from environment env_Variable' statement to accept the 'var' value from the external environment and use it in place of the hardcoded "1.dat" file name.  



yes..this is working...

but i am not able to set environment variable from perl..

i have following perl script

-------
#!d:\Program Files\NCR\TDAT\LPDE\PERL\BIN\MSWIN32-X86\perl -w
print "Running Mload Scripts\n";

system("set ENV_VAR=mdl_data.txt");
system `mload  err99.txt`;
------

in mload.txt i have following lines....

----------------------------------
.accept fname FROM ENVIRONMENT VARIABLE ENV_VAR;
.import infile &fname
        layout mylayout
        format text
        apply myinsert ;
--------------------------------

but following is not working in perl

system("set ENV_VAR=mdl_data.txt");

but when i do from command line like following working fine....

set ENV_VAR=mdl_data.txt



how to set environment variables from perl?

Thanx



     
  <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