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

FTP JCL


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

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Thu Dec 20, 2007 3:14 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Dec 20, 2007 3:21 pm
Reply with quote

Santoshdorge wrote:
can we extract current timestamp in same FTP step?


No.
Back to top
View user's profile Send private message
sridhar_nagireddy

New User


Joined: 11 Oct 2006
Posts: 1
Location: UK Nottingham

PostPosted: Thu Dec 20, 2007 4:26 pm
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Fri Dec 21, 2007 9:44 am
Reply with quote

Even if you dont know REXX, you can write simple SORT statement to get time stamp for your ftp file.
Back to top
View user's profile Send private message
Mary Lewis

New User


Joined: 25 Dec 2007
Posts: 15
Location: Albany, NY

PostPosted: Wed Dec 26, 2007 8:16 pm
Reply with quote

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
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

 


Search our Forums:

Back to Top