IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

append a date in a file in FTP step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
G1NXU6T

New User


Joined: 22 Jun 2009
Posts: 11
Location: India

PostPosted: Fri Dec 16, 2011 12:16 am
Reply with quote

hi

i am transferring a file from mainframes to a share drive by FTP step .

I want that current date should be appended to my file name when it reach the destination.

FTP card i am using is as follows

//CNBILD10 EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*
//INPUT DD DSN=IBM045.BATCH.PROCLIB(FTPPARM),
// DISP=SHR
//*

where IBM045.BATCH.PROCLIB(FTPPARM), has following values .

ip
user name
password
put 'ABC.TEST.DATA' ABC_Date.txt
quit.

I want my file should look like ABC_20111212.txt
where 20111212 is 12/12/2011 Current system date.

Could u please help me how can i achieve that.

I have read few earlier post on this forum, but none of then actually worked.

So please if anyone has worked on this problem earlier please post the solution.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 16, 2011 12:26 am
Reply with quote

You need something to generate the output file name either dynamically, or to speak with your scheduling people regarding the scheduler date variables used with instream cards.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Dec 16, 2011 2:28 am
Reply with quote

G1NXU6T wrote:
I have read few earlier post on this forum, but none of then actually worked.


Which earlier posts? I know that the information here:

www.ibmmainframes.com/viewtopic.php?t=29170&highlight=ezacfsm1

will work because I've actually used the same process.
Back to top
View user's profile Send private message
G1NXU6T

New User


Joined: 22 Jun 2009
Posts: 11
Location: India

PostPosted: Fri Dec 16, 2011 12:49 pm
Reply with quote

Thanks Expat and Superk.

SuperK your method finally worked for me, I was making a mistake.

While creating the temporary file, the file is generating with some Junk values at the end, which i was ignoring and because of which my FTP failed. I created the Catalog file instead of temp and found the problem, fixed it and it worked.

Finally it worked for me .. Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top