Posted: Tue Mar 04, 2014 3:03 pm Post subject: Is it possible to pass a parameter into a record using JCL ?

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.

Posted: Tue Mar 04, 2014 3:10 pm Post subject: Reply to: Is it possible to pass a parameter into a record u

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

Posted: Tue Mar 04, 2014 10:05 pm Post subject: Reply to: Is it possible to pass a parameter into a record u

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