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

Initiate a JCL ?


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

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Thu Mar 09, 2006 12:26 pm
Reply with quote

A job can maximum of 255 steps. So if we want to execute more than 255 steps.


can we able to trigger a jcl from another jcl ?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 09, 2006 12:40 pm
Reply with quote

Sure, you've got few methods:
1 - Use batch TSO (IKJEFT01) with the SUBMIT command.
2 - Call REXX from a job to submit other jobs.
3 - Use other programming language to submit job from a job (like COBOL, NATURAL, Assembler etc.).
4 - Make your last step an IEBGENER that its input will be the next job, and the output is allocated to INTRDR.

O.
Back to top
View user's profile Send private message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Thu Mar 09, 2006 2:28 pm
Reply with quote

Hi,

Already discussed in the forum.
To execute more than 255 steps : We need to split jcl into two jcls , at the end of the first jcl check the condition code and if successful you can initiate the second jcl.

Thanks,
KS
Back to top
View user's profile Send private message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Thu Mar 09, 2006 3:21 pm
Reply with quote

Make your last step an IEBGENER that its input will be the next job, and the output is allocated to INTRDR?

Check for the condition code of the last step in JCL.
IF RC = O THEN do the following .

//STEP050 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=SYSPDA.JCLLIB(JCL2),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY

Here SYSPDA.JCLLIB is the dataset where ur second JCL resides.
INTRDR is a special SYSOUT data set that other programs can use to submit jobs, control statements.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 09, 2006 4:36 pm
Reply with quote

INTRDR is a program, not dataset ... icon_biggrin.gif

O.
Back to top
View user's profile Send private message
KS

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Thu Mar 09, 2006 5:33 pm
Reply with quote

I agree its not a dataset..but its not a proper program like cobol too.
Its neither a dataset nor a program.
Kindly verify by putting Quick watch (qw INTRDR) in ISPF.Its mentioned as a dataset.

Thanks,
KS
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 09, 2006 5:44 pm
Reply with quote

In many of the IBM manuals, they also refer to sysout as being a dataset, so I guess calling it that is correct. Confusing, maybe.
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Wed Mar 15, 2006 6:21 pm
Reply with quote

All methods r working fine.

Thanks kuttisatha and superk for your valuable informations.

How to submit the job from cobol program ?.


Thanks,
Ramesh
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Mar 15, 2006 6:53 pm
Reply with quote

See the above post from KuttiSatha. Use the same method.
Back to top
View user's profile Send private message
Rameshs

New User


Joined: 15 Jun 2005
Posts: 53
Location: India, Chennai

PostPosted: Wed Mar 15, 2006 7:05 pm
Reply with quote

Here is the link

To submit JCL via a Cobol program?

http://ibmmainframes.com/viewtopic.php?t=4102&highlight=trigger+job

Thanks,
Ramesh icon_smile.gif
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Thu Mar 16, 2006 6:21 pm
Reply with quote

hy Rameshs,

you really have such a job,
or you just want to try out the limits of jes?
a job with 255 steps is simply not maintainable,
therefore my tip: don't do it!

while using this you might get other limitation problems...

martin9
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 How to Initiate the other job form th... JCL & VSAM 1
Search our Forums:

Back to Top