View previous topic :: View next topic |
Author |
Message |
Declan Beginner
Joined: 04 May 2005 Posts: 15 Topics: 8
|
Posted: Wed May 18, 2005 8:20 am Post subject: Replacing SYSIN lines with DSN |
|
|
Hi guys,
I've been stumped by a program change request. It sounded quite simple at the outset and perhaps I'm overcomplicating it for myself.
The following series of lines (I've used dud IP address and DUD file location):
Code: | //SYSIN01 DD *
IPNAME=12.34.56.789
TYPE=SEND
CKPT=0
RESTART=NO
FILEOPT=CREATE
CODE=EBCDIC
RECSEP=NO
PACK=LENGTH
COMPRESS=NO
FILETYPE=FILE
LFILE='DECLAN.PROD.2005'
FILE='/sample/location/data/declan/sample_20050501.dat'
USERID=*******
PASSWORD=****** |
is to be replaced by a DSN name containing each of these lines, so that the CCYYMMDD date on the FILE line can be changed to contain the date on which the JCL is run.
e.g.
Code: | NEWSTEP DD DSN=DECLAN.DATE.SYSIN,DISP=SHR |
I've tried setting a working storage field for each line, and then writing each line to the file, but it hasn't worked - maybe I'm not testing correctly.
But can anyone come up with any better suggestions for how to code for this?
I apologise if I've posted in the wrong forum - perhaps it should be an Application Programming post.
Thanks! Declan |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Wed May 18, 2005 8:37 am Post subject: |
|
|
Declan,
If I understand your requirement correctly , all you want to change the date to be current date in file line i.e
Quote: | FILE='/sample/location/data/declan/sample_20050501.dat' |
Am I right? And I am assuming that you wanted the date to be in CCYYMMDD format.
You can use the symbol translator utility, EZACFSM1, to translate the symbols before the files are read by TCP/IP. EZACFSM1 reads an input file and writes to an output file, translating any symbols in the process.
Code: |
//STEP0100 EXEC PGM=EZACFSM1
//SYSIN DD *
IPNAME=12.34.56.789
TYPE=SEND
CKPT=0
RESTART=NO
FILEOPT=CREATE
CODE=EBCDIC
RECSEP=NO
PACK=LENGTH
COMPRESS=NO
FILETYPE=FILE
LFILE='DECLAN.PROD.2005'
FILE='/SAMPLE/LOCATION/DATA/DECLAN/SAMPLE_&LYR4&LMON&LDAY..DAT'
USERID=*******
PASSWORD=******
//SYSOUT DD SYSOUT=*
|
Now check your sysout and you will find the current date on the file statement.
Check this link for a discussion on EZACFSM1
Hope this helps....
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Declan Beginner
Joined: 04 May 2005 Posts: 15 Topics: 8
|
Posted: Wed May 18, 2005 9:18 am Post subject: |
|
|
That's great, Kolusu - thanks for you quick reply - it works perfectly - a fantastic help - thank you |
|
Back to top |
|
 |
|
|