View previous topic :: View next topic
|
Author |
Message |
sumit agarwalla
New User
Joined: 13 Nov 2008 Posts: 17 Location: hyderabad
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
pankaj1002
New User
Joined: 30 Jul 2012 Posts: 18 Location: India
|
|
|
|
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. |
|
Back to top |
|
|
sumit agarwalla
New User
Joined: 13 Nov 2008 Posts: 17 Location: hyderabad
|
|
|
|
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 |
|
|
|