IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to submit multiple jobs with parm from another job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GGLionCross
Warnings : 1

New User


Joined: 14 May 2021
Posts: 1
Location: United States

PostPosted: Fri May 14, 2021 10:56 pm
Reply with quote

Hi everyone! I'm pretty new to mainframes and so it's still taking time getting used to, and I tried searching for the answer to the question up above on Google and these forums but can't seem to find the right one for my needs.

The problem is there are 58 jobs that need to be submitted. They are not currently set up as PROCs, and they all relatively look similar except for the first job which has a few extra steps. They each have TXYY property which is a year value. I was attempting to do this using ICEGENER but didn't know how to SET the TXYY variable within each job properly (or if it's even possible).

My sample code:
//JOB01 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=BP.PRD.JCLLIB(EXTJOB01),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY
//*
//JOB02 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=BP.PRD.JCLLIB(EXTJOB02),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY

My plan is to duplicate the above code for 56 other jobs. But is there a way to achieve this while also setting a PARM in each of the jobs I'm passing to the internal reader?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2120
Location: USA

PostPosted: Fri May 14, 2021 11:04 pm
Reply with quote

1) You must use the code tags when posting any code samples

2) Your example does not include “multiple jobs”, but rather “multiple job steps”

3) You can easily use a local // PROC definition at the top of your (actual) job, to // EXEC this procedure multiple times in the same job

4) Any JCL, before it has been SUBMITted, is just a plain text, nothing else. If only you have any experience with text handling tools (hundreds of them are available, from REXX to SORT utilities, and beyond), then you can easily generate your either jobs, or job steps, or whatever else, and then to SUBMIT it using internal reader.

5) It is unclear, what is your TXYY parameter, and where it is supposed to go? If you clarified this issue, you would get some advice.

6) It seems to be a one-time-task - how to create this “huge”(?) JCL? If so, the best way to do this must be: using ISPF editor to create such JCL once, and then to submit it millions of times.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 725
Location: Denmark

PostPosted: Sat May 15, 2021 2:26 am
Reply with quote

I assume from your sample that you want to submit 56 jobs via INTRDR from the one shown. You don't need 56 steps for that, just 56 DD statements like:
Code:
//S1 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=BP.PRD.JCLLIB(EXTJOB01),DISP=SHR
// DD DSN=BP.PRD.JCLLIB(EXTJOB02),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY

Now to your parameter question, as sergeyken writes, we need some more info. You might be able to use JCL symbols, but you will need to modify the jobs somehow, unless you use a program to read the jobs and write the result to INTRDR.

And don't post the same question in multiple sections, it is bad form and likely to get you banned icon_wink.gif
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Sun May 16, 2021 6:53 am
Reply with quote

Mr. Jensen is correct. What Mr. Jenson did not say is that each job step in GCLionCross's initial post submits a complete job. The second step is not a continuation of the first step.

Another possible concern is the JCLLIB suffix in the data set name. Many times a data set with the JCLLIB suffix contains user cataloged procedures brought into the JCL by using the

// JCLLIB ORDER=(....JCLLIB) JCL statement

A cataloged procedure does not have a // JOB JCL statement; each member specified in the JCL like the JCL in the initial post must have JOB JCL statement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts System add a USER parm when job submi... TSO/ISPF 4
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Finding and researching jobs All Other Mainframe Topics 0
Search our Forums:

Back to Top