|
View previous topic :: View next topic
|
| Author |
Message |
ARUL PRASATH
New User

Joined: 04 Mar 2014 Posts: 1 Location: India
|
|
|
|
Hi, I want to create a file whose name varies along with a single record in it whose 8th to 11th position also varies with the date of submission of the Job. For e.g, If I want to create the file on 172nd day of the year, the file should have name of XXX.YYY.K172 and the record generated should have the value 'K172' in 8th-11th position.
I am creating the file with the file name as required since I pass the value 'K172' as a parameter into the JCL. But I do not know any method to create a record in a file just using JCL. So I made an existing file as a reference file and made the job to copy the data from the reference file so that I can have the record. The problem is the variable in the record as mentioned above.
I learnt we can use Overlay function to pass it as character but I have 20+ files to be created like this and it is not possible to edit all the 20+ files in the JCL at a time. Is it possible to move the variable into the record as a parameter like we use it to name the file ?
Or Is there any other way to generate a file with a single record using JCL like mentioned above by passing the values to the record ?
The record length is 160 bytes and it has 2 variables each of length 4 and 6. All other values are default.
Thanks in advance |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
to do it in one step depends on Your zOS level ( 2.xxxx required )
and the standards in use in Your organization
You will have to do do it in two jobs
the first one will build the second one and submit it thru the internal reader
unless You have a scheduler that blindly substitutes a scheduler parameter with the proper value
in this case everything could be automated without any human intervention by having the scheduler substitute the ( for example ) job run day |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| Enrico has given the best solution..in one of my current job flow similar to this getting executed. |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
ARUL PRASATH,
Unless I grossly misunderstood the question, it is a quite simple job for DFSORT where you can pass parms Via JPn construct. With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct, 2010), you can now use DFSORT's new JP1 Symbols to pass parms to sort like shown below
| Code: |
// SET PASSVAL='K172'
//STEP0100 EXEC PGM=SORT,PARM='JP1"&PASSVAL"'
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DSN=XXX.YYY.&PASSVAL,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,0),RLSE)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,BUILD=(160X),HEADER1=(8:JP1)
//* |
Check this link which explains in detail about Using SET and PROC Symbols in DFSORT and ICETOOL Statements.
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/8.7?
enrico-sorichetti,
Why do you think you need z/OS 2.1x? Are you thinking of PARMDD? |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
| Quote: |
| Why do you think you need z/OS 2.1x? |
I was just thinking about parameter substitution in a generic sysin |
|
| Back to top |
|
 |
|
|