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
 

 

Preventing hard coding of File Name in FTP step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Thu Sep 14, 2006 10:08 pm    Post subject: Preventing hard coding of File Name in FTP step
Reply with quote

Hi,
I would like to know is there any way to prevent hard coding in FTP file step.

For Ex in FTP step to transfer a mainframe file to LAN, the command is as follows.
userid
pwd
CD fin-mgmt-ftp
CD #2006DOWNLOADS\08_AUGUST\INDIVIDUAL\08_SALES
PUT ' ZFDZ03.DIRMDL.DATA' DIRMDL_081206.PRN
QUIT

The LAN file name has a date field hard coded in it indicating the run date of the job. Instead of hard coding it in the FTP step(because i do not want to change them every month) is there a way to transfer it to the LAN in the same name ? I am using JCL and EASYTRIEVE language for the program generating the M/F file.
Assume the date 081206 is present in a file.
Also the FTP path folder changes for every month run(Month name changes). This also needs to be taken care.

Thank you in advance for your help.
Back to top
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Sep 14, 2006 10:36 pm    Post subject: Re: Preventing hard coding of File Name in FTP step
Reply with quote

This is only a suggestion.

If you have all the date information in your easytrieve program, could you write out an additional 80 position fixed blocked output file with the FTP control card information? The file could then be read into the INPUT DD of the FTP step.
Back to top
View user's profile Send private message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Thu Sep 14, 2006 10:43 pm    Post subject: Re: Preventing hard coding of File Name in FTP step
Reply with quote

Hi,

Thanks for your reply. I am not able to understand your view. Could you please detail me on that.
Instead of hard coding the date in LAN file name DIRMDL_081206.PRN, what i thought was to get the date from an input file and somehow use that in the LAN file name. This is what i mentioned when i specified "Assume the date 081206 is present in a file".

Thanks
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Sep 14, 2006 11:09 pm    Post subject: Re: Preventing hard coding of File Name in FTP step
Reply with quote

You state:
Quote:

I am using JCL and EASYTRIEVE language for the program generating the M/F file. Assume the date 081206 is present in a file.


In the following control cards, the 1st, 2nd, 3rd, and 6th cards have no variable information, so they are constant and should not change. The 4th and 5th cards do have variable information. In your easytrieve program, you are writing the M/F to some output DD statement. My suggestion was to have your easytrieve program define and create another output DD statement where you could read the file that contains the date (if you don't already have the date in working storage), extract it, and format it so it could be substituted with the hardcoded data of the 4th and 5th control cards. There would be 6 records written to the new OUTPUT DD statement with a dataset name of ZFDZ03.FTP.CONTROL.CARDS and that 80 byte dataset would be input to the FTP step as INPUT rather than INPUT DD *

Code:

userid
pwd
CD fin-mgmt-ftp
CD #2006DOWNLOADS\08_AUGUST\INDIVIDUAL\08_SALES
PUT ' ZFDZ03.DIRMDL.DATA' DIRMDL_081206.PRN
QUIT
 


Code:

//S13FTPW  EXEC PGM=FTP                     
//YSPRINT DD   SYSOUT=*                   
//OUTPUT   DD   SYSOUT=*                   
//INPUT    DD   DISP=SHR,DSN=ZFDZ03.FTP.CONTROL.CARDS
Back to top
View user's profile Send private message
Anu Narayanan

New User


Joined: 12 Sep 2005
Posts: 20
Location: USA

PostPosted: Fri Sep 15, 2006 12:08 am    Post subject: Re: Preventing hard coding of File Name in FTP step
Reply with quote

Hi,

How to write the date from the file (or working storage variable) specifically in to the 4th or 5th card of the ZFDZ03.FTP.CONTROL.CARDS. how to view the FTP control cards ?
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Sep 15, 2006 12:49 am    Post subject: Re: Preventing hard coding of File Name in FTP step
Reply with quote

I am not an easytrieve programmer. I can only program in SAS, REXX and a little COBOL. With any programming language, you can write the logic to manipulate data and put it in whatever form you need. I can't tell you how to do it in easytrieve, but I know it can be done.

If you know the field in the file that contains the DATE, even IBM's DFSORT/ICETOOL product could probably generate the needed control cards.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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