|
View previous topic :: View next topic
|
| Author |
Message |
vnktrrd
New User
Joined: 12 Jan 2010 Posts: 34 Location: New York
|
|
|
|
Hi All,
I have a requirement where I don't want to repeat the steps coded under HEADER3. Instead the job with one step has to be repeated for every value of the input and submitted through internal reader.
Please advise how to do it. When I move the "Sections=(81,3," above HEADER1, its giving me error.
| Code: |
//GTMCREO1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=FILE1,
// DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,STOPAFT=255
OUTREC OVERLAY=(81:SEQNUM,3,ZD)
OUTFIL REMOVECC,NODETAIL,BUILD=(80X),
HEADER1('//JOB1 JOB ',X'7D','SPLIT JOBS',X'7D',
',CLASS=A,',/,
'//',13X,'MSGCLASS=Y,MSGLEVEL=(1,1),',/,
'//',13X,'NOTIFY=&SYSUID',/,
'//*',/,
'/*JOBPARM S=P000',/,
'//PROCLIB JCLLIB ORDER=PROCLIB'),
SECTIONS=(81,3,
HEADER3=('//STEP0',81,3,X,'EXEC PROC1,',/,
'// FRMTS=2018-07-25-00.00.00.000000,',/,
'// TOTS=2018-07-25-00.00.00.000000,',/,
'// VALUE=P001,VERS=VERS1,INPFIELD=',1,4),
TRAILER3=('//*'))
//*
|
To explain clearly this is the code I have to create a job and add one step for each value of the INPFIELD from input file FILE1.
I want this code to be modified to generate a 'job and one step' for each value of the INPFIELD and submit it to internal reader. I dont multiple steps in the same job for each field. I want one job for each INPFIELD.
Thanks in advance. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
It’s impossible just to “move SECTION=(81,3 above HEADER1”.
Please, speak slowly, and clearly. |
|
| Back to top |
|
 |
vnktrrd
New User
Joined: 12 Jan 2010 Posts: 34 Location: New York
|
|
|
|
Hi,
I would also want to make the "FRMTS=2018-07-25-00.00.00.00000" , "TOTS=2018-07-25-00.00.00.000000" and "VALUE=P001,VERS=VERS1" parameters dynamic by passing symbolic parameters. When I pass symbolic parameters, DFSORT is not evaluating them.
Thanks. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
You can probably pass the parameters using the JPn parameter.
Just curious, why would you want separate jobs instead of one job with several steps in it? |
|
| Back to top |
|
 |
vnktrrd
New User
Joined: 12 Jan 2010 Posts: 34 Location: New York
|
|
|
|
Hi Arun,
In each step of the job I'd be calling another proc which has around 20 steps. So if I create 40 steps for each value of the input file, it would cross the 255 limit for a job.
Then I thought of having a single job with one step created at once and submit it immediately.
Please advise if there is a way around to to do this.
Thanks. |
|
| Back to top |
|
 |
vnktrrd
New User
Joined: 12 Jan 2010 Posts: 34 Location: New York
|
|
|
|
I am able to create this for the first value of the input file. Would you please advise how to repeat this for each value of the input file ?
| Code: |
OPTION COPY
OUTREC OVERLAY=(81:SEQNUM,3,ZD)
OUTFIL REMOVECC,NODETAIL,
HEADER1('//JOB1 JOB ',X'7D','SPLIT JOBS',X'7D',
',CLASS=A,',/,
'//',13X,'MSGCLASS=Y,MSGLEVEL=(1,1),',/,
'//',13X,'NOTIFY=&SYSUID',/,
'//*',/,
'/*JOBPARM S=P000',/,
'//PROCLIB JCLLIB ORDER=PROCLIB',/,
'//STEP0',81,3,X,'EXEC PROC1,',/,
'// FRMTS=2018-07-10-15.00.00.000000,',/,
'// TOTS=2018-07-19-17.00.00.000000,',/,
'// VALUE=P01,VERS=VERS1,INPFILE=',1,4,/,
'//*')
//*
|
Thanks. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| You could do this using a bit of rexx code, if you would like to do that way. Using the sort utility, it might be a bit more complex. You may have to build a file with all the jobs-one after the other, then read this file, route each job into different OUTFIL dd data sets dynamically. |
|
| Back to top |
|
 |
vnktrrd
New User
Joined: 12 Jan 2010 Posts: 34 Location: New York
|
|
|
|
Hi Arun,
Can't we write the built JCL statements to INTRDR directly without writing to a file ? That way its submitted upon writing to INTRDR which is what we want.
I am able to submit the JCL statements to INTRDR built for first value of the file. I just have to repeat the BUILD for each value of the input file. Please advise on this.
Thanks. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Why not use ISPF file tailoring for the purpose it was designed for, tailoring pre defined JCL skeletons for certain situations. Gives you far better control when things change. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| vnktrrd wrote: |
Hi Arun,
Can't we write the built JCL statements to INTRDR directly without writing to a file ? |
Yes that is what I meant by writing multiple OUTFIL DDs and each routed to INTRDR.
Also look at expat's suggestion above. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2272 Location: USA
|
|
|
|
| expat wrote: |
| Why not use ISPF file tailoring for the purpose it was designed for, tailoring pre defined JCL skeletons for certain situations. Gives you far better control when things change. |
So far, the task seems to be too trivial for FT with the whole ISPF environment to get involved. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
vnktrrd,
I did not realize you can have multiple job cards in the same data set and once that is routed to internal reader, those would get submitted as individual jobs, until a friend of mine discussed about this with me. You can remove the HEADER1 and move the job card to the HEADER3 and build a single output with multiple job cards. You might as well talk to your scheduling guys if they can set something up instead of you building this submission process. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|