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

Changing the file names to be FTP'd


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sumit agarwalla

New User


Joined: 13 Nov 2008
Posts: 17
Location: hyderabad

PostPosted: Tue Feb 05, 2013 12:12 pm
Reply with quote

Hi,

I am trying to FTP 4 files thru JCL, the format of which in the SYSIN is:
1. USRID.AAAA.OUTFILE1.DEACT1.YYYYMMDD_HHMMSS.dat
2. USRID.AAAA.OUTFILE2.ACT1.YYYYMMDD_HHMMSS.dat
3. USRID.AAAA.OUTFILE3.DEACT2.YYYYMMDD_HHMMSS.dat
4. USRID.AAAA.OUTFILE4.ACT2.YYYYMMDD_HHMMSS.dat

Now the other system wants the file with Current date in YYYYMMDD. The HHMMSS is not mandatory and i use random numbers at present. What i do now is edit the file name in the JCL with current date and then FTP it.

I want to know if there is any FTP command or any other way i can get the current date and change the file names without doing it manually.
I have thought of a way in which i would write a eazytrieve in the first step to get the current date and change the file names and then FTP this files.

Please suggest is there any other way to do this.


Code:

//INPUT    DD  *     
ftp xxxxxxx   
PWD                 
ASCII                                                             
CD '/xxx/yyyy/landing/xyza'                                       
PWD                                                               
PUT 'USRID.AAAA.OUTFILE1' DEACT1.YYYYMMDD_HHMMSS.dat       
CD '/xxx/yyyy/landing/xyzb'                                         
PWD                                                               
PUT 'USRID.AAAA.OUTFILE2' ACT1.YYYYMMDD_HHMMSS.dat           
CD '/xxx/yyyy/landing/xyzc'                               
PWD                                                               
PUT 'USRID.AAAA.OUTFILE3' DEACT2.YYYYMMDD_HHMM.dat
CD '/xxx/yyyy/landing/xyzd'                                 
PWD                                                               
PUT 'USRID.AAAA.OUTFILE4' ACT2.YYYYMMDD_HHMM.dat     
QUIT
/* 
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Feb 05, 2013 3:40 pm
Reply with quote

1. If your site uses CA-7, the facility called CA-DRIVER or CARPROC can do this.
2. Write a program in the language of your choice to create the FTP commands.
3. Ask your site support group for help -- they know, better than anyone on an outside forum, what tools and facilities are installed at your site and there may well be something already installed to help you with this.
Back to top
View user's profile Send private message
pankaj1002

New User


Joined: 30 Jul 2012
Posts: 18
Location: India

PostPosted: Wed Feb 06, 2013 5:22 pm
Reply with quote

You may need to add one step before the FTP step using EZACFSM1

Not sure if your shop have this or not. But you can give it a try. icon_smile.gif
Back to top
View user's profile Send private message
sumit agarwalla

New User


Joined: 13 Nov 2008
Posts: 17
Location: hyderabad

PostPosted: Mon Feb 11, 2013 12:17 pm
Reply with quote

Thanks for the suggestions Robert and Pankaj.

I have done the changes using the Eazytrieve method that i had mentioned.

But i will definitely give it a try to the other options you have mentioned.

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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top