Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8154
Location: East Dubuque, Illinois, USA

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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us