FTP target file with date and time qualifier

2 posts / 0 new
Last post
Anonymous (not verified)
FTP target file with date and time qualifier

I am trying to ftp a file from mainframe to wintel server, I am using a JCL to transfer the file.

The requirement is to have name of the target file unique each time transfer occurs, for this I plan to append the date and time as suffix to the file name, so that the file name generated each time is unique.

"; ; ; ;

The following is the JCL that I am using.

 

//FTPSTEP EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//INPUT DD *
ip address
m/f user id
m/f password
put 'Source_file' Target.file.YYMMDD.HHMMSS
quit. /*
//OUTPUT DD SYSOUT=*

 

Can someone help me in meeting the above requirement?

Anonymous (not verified)
Use symbol translator to create the target file name

You can make use of symbol translator to create the target file name with date and time appended. For this
you first create the ftp input card using the symbol translator and then use the same ftp card in the
subsequent step to ftp the file.

 

//SYMBOLT  EXEC PGM=EZACFSM1                                       
//SYSIN    DD   *
put 'Source_file' Target.file.&LYYMMDD.&LHHMMSS
quit
/*
//SYSOUT   DD   DSN=&&TEMP,DISP=(,PASS),                     
//         RECFM=FB,LRECL=80
//*

//FTPSTEP EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//INPUT DD *
ip address
m/f user id
m/f password
//         DD   DSN=&&TEMP,DISP=(OLD,DELETE)                         
/*
//OUTPUT DD SYSOUT=*

Log in or register to post comments
Sponsored Listing

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer

Navigation