I have a requirement where I have to FTP a file from mainframe to windows daily. The source is a GDG generation and the destination should be something like this "FileYYYYMM" where "YYYY" is current year, "MM" is current month and "DD" is current day.
After some research in google I could write the below script to prepare the destination file name which has the dynamic date in it, now I am not able to use this variable in the ftp GET command. Can some one help me on this.
FOR /f "tokens=1-4 delims=/-. " %%G IN ('date /t') DO (call :s_fixdate %%G %%H %%I %%J)
if "%1:~0,1%" GTR "9" shift
FOR /f "skip=1 tokens=2-4 delims=(-)" %%G IN ('echo.^|date') DO (
set %%G=%1&set %%H=%2&set %%I=%3)
Joined: 01 Sep 2006 Posts: 2061 Location: Silicon Valley
Not sure what this has to do with TSO/ISPF...
It looks like you are determining what the file name should be, but not doing anything with it. You need to re-create the ftpMFtoWN.txt file each time. And use the actual file name instead of the text of 'filename'