View previous topic :: View next topic
|
Author |
Message |
Santoshdorge
New User
Joined: 27 Jun 2006 Posts: 48 Location: Pune
|
|
|
|
Hi All,
Can anybody provide me a JCL which meets following criteria.
I need to ftp file to open system.While FTP'ing file I need to append current timestamp to the file name so that it should not get replced next time or job should not fail on next run.
Can we do this in same FTP step ...I mean can we extract current timestamp in same FTP step?
Actually for some unknown reason I don't want to add extra step to my job which can modify the PUT stmt to add current timestamp.I am looking to do this in one FTP step only. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Santoshdorge wrote: |
can we extract current timestamp in same FTP step? |
No. |
|
Back to top |
|
|
sridhar_nagireddy
New User
Joined: 11 Oct 2006 Posts: 1 Location: UK Nottingham
|
|
|
|
Hi ,
We faced the same problem when our client said that a daily file which needs to FTPed to a open system folder with same filename,
we solved it by calling a REXX routine to append the timestamp to the file name before it is FTPed.
I feel this is not exact answer that you are looking , but a possible soloution if anybody in ur team knows REXX.
Thanks
Sridhar |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
Even if you dont know REXX, you can write simple SORT statement to get time stamp for your ftp file. |
|
Back to top |
|
|
Mary Lewis
New User
Joined: 25 Dec 2007 Posts: 15 Location: Albany, NY
|
|
|
|
If you are using an automated scheduler to submit your JCL (like TWS), it has built in variables for date formatting. I use TWS and weekly FTP a file to another agency, with the current date as the prefix of the file name, as follows: &CYMD._Agency_Hotfile.txt. When TWS submits the job the current date in CCYYMMDD format is part of the file name created. Unfortunately this JCL won't do the substitution if run outside of TWS. It's too bad that regular JCL doesn't offer this feature.
Hope this helps! |
|
Back to top |
|
|
|