Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 24 Jun 2006 @ 10:06:07 GMT


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


Subj:   Re: Fast Load- How to set filename as a variable in the fastload script
 
From:   McCall, Glenn David

  I run fastload for my table everyday. Is there a way to pass the filename of the file to be loaded to the fastload script so that I don't have to update the filename in the file manually everytime?  


This is extremely straightforward if you are running on Unix.

Simple wrap your fastload script in a shell script such as this:

     #!/bin/ksh

     fastload <


The commands between the two EOI labels are supplied to fastload. You can use any label pair that you like just as long as the second one is on a line by itself with no leading or trailing whitespace.

The file name is supplied on the command line that runs the script and is accessed via the $1 in the script. Invocation example where todays_file is the name of the file to be loaded (and may include a path):

     myfastload.sh todays_file

On windows, you could use one of the Unix emulators such as cygwin. On the mainframe - I have no idea.


All the best

Glenn Mc



     
  <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