Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

append a date in a file in FTP step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: append a date in a file in FTP step
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: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 16, 2011 12:26 am    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Dec 16, 2011 2:28 am    Post subject: Re: append a date in a file in FTP step
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:

http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us