MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Replacing SYSIN lines with DSN

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Declan
Beginner


Joined: 04 May 2005
Posts: 15
Topics: 8

PostPosted: Wed May 18, 2005 8:20 am    Post subject: Replacing SYSIN lines with DSN Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed May 18, 2005 8:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Declan
Beginner


Joined: 04 May 2005
Posts: 15
Topics: 8

PostPosted: Wed May 18, 2005 9:18 am    Post subject: Reply with quote

That's great, Kolusu - thanks for you quick reply - it works perfectly - a fantastic help - thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group