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
 

 

Changing the file names to be FTP'd

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Changing the file names to be FTP'd
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: 7998
Location: Bellevue, IA

PostPosted: Tue Feb 05, 2013 3:40 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Changing the file names to be FTP'd
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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