Hi.
We have an FTP function to upload a physical file from AS/400 onto an external host (window based server)
The requirement is that the file to be uploaded should be named in YYYYMMDD format. eg : XX_20080521
We have a CL which will perform the FTP upload function, together with a FTP script (which is in TXT file format in AS/400)
Below is the content of the FTP script
*****
0001.00 xxxx_id xxxxx_pass
0002.00 LOCSITE TRIM 0
0004.00 PUT MPPDATAH/MU1EQTNSF PFMRE_YYYYMMDD.DAT
0005.00 QUIT
*****
Do you know how we will be able to accomplish this ?
My idea is that we need to create a RPG program, read the FTP scrip txt file, then change the "YYYYMMDD" string to current date string. Then proceed to perform the FTP upload operation.
Can you please guide me how we can read a TXT file and update the string by using RPGLE ? (the TXT file is an TXT type member located in a library)
Or if you have any other ideas that would be much appreciated.
Thank you and regards.
We have an FTP function to upload a physical file from AS/400 onto an external host (window based server)
The requirement is that the file to be uploaded should be named in YYYYMMDD format. eg : XX_20080521
We have a CL which will perform the FTP upload function, together with a FTP script (which is in TXT file format in AS/400)
Below is the content of the FTP script
*****
0001.00 xxxx_id xxxxx_pass
0002.00 LOCSITE TRIM 0
0004.00 PUT MPPDATAH/MU1EQTNSF PFMRE_YYYYMMDD.DAT
0005.00 QUIT
*****
Do you know how we will be able to accomplish this ?
My idea is that we need to create a RPG program, read the FTP scrip txt file, then change the "YYYYMMDD" string to current date string. Then proceed to perform the FTP upload operation.
Can you please guide me how we can read a TXT file and update the string by using RPGLE ? (the TXT file is an TXT type member located in a library)
Or if you have any other ideas that would be much appreciated.
Thank you and regards.
Comment