Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
Thanks for your prompt response. If the put statement can do it, I would be more than happy.
The reason why I tried it in rename is, it is working from the command prompt (dos). I tried to rename a file on my desktop with the command i gave above. It worked. But it is not working if i use in FTP jcl.
Please let me know if the put statement can itself do the rename to the current date.
I tried this, But it didn't work out. The FTPd file name is now TEST%DATE
PUT 'XYT.XY0097.ZXY97S10.XY97OUT' TEST%DATE:~10,4%.TXT
I tried to list the files it after the PUT, it didn't transfer the data properly. Showing zero bytes
EZA1701I >>> LIST ABCD*
150 Opening ASCII mode data connection for /bin/ls.
EZA2284I 09-07-11 01:28AM 0 ABCD%DATE
Joined: 06 Jun 2008 Posts: 8231 Location: Dubuque, Iowa, USA
FTP is a file transfer protocol. It has NO scripting capability AT ALL. Therefore, you will have to find a way to generate the file name in the format you want and pass it as part of the FTP commands to the FTP step. You can generate the FTP commands via SAS, REXX, a progrram written in the language of your choice, and most likely even SORT.