I am trying to receive data from a client site into an externally described file on my ISerie. Data will be received daily and the file name is date stamped, (for example:filea103106, filea110106)my problem is that since it needs to be copied into MYLIB/MYFILE, I cannot use the MGET filea* to copy it in that specific library/file. I have to specify the file name every time. Is there a way to rename the file to a specific name once its received on my ISerie??
Software/Hardware used:
ASKED:
November 1, 2006 10:39 AM
UPDATED:
December 25, 2009 2:08 AM
I have to get data files from a multiple client sites and I use this same type of procedure on each one. I use the mget filename*.txt (or any extension). I download the data files into a “trash” directory on the IFS. When the FTP session ends, I use “DIR” on that “trash” directory using the outfile option. I have a file (“FILEA”) which contains records of processed file names and date of processing. I will compare the “DIR” outfile file names to the “FILEA” and bypass any file names found. I copy the new data file into a physical file (or whatever processing needs to be done). After processing the data, I will add a record into “FILEA”. I will use the “FILEA” current date to generate a rename FTP script. I run the second FTP script renaming the processed files as filename.txt to filename.txt.old.