Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Trigger a JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
Ganesh K Rajan

New User


Joined: 13 May 2005
Posts: 8

PostPosted: Thu Aug 11, 2005 12:20 pm    Post subject: Trigger a JCL
Reply with quote

Hi all,

I want to Trigger a job (JOB2) based on the job(JOB1.step1)'s return code. Is it possible for me to do it..

Thanks & Regards,
Ganesh.K
Back to top
View user's profile Send private message
References
Prandip

Active User


Joined: 04 Mar 2005
Posts: 89
Location: In my tiny cubicle ...

PostPosted: Thu Aug 11, 2005 4:07 pm    Post subject: Re: Trigger a JCL
Reply with quote

Sure, just use a conditional statement and submit the job through the JES Internal Reader:

Code:

//JOB1 JOB (....),CLASS=X,MSGCLASS=X
//*
//STEP1 EXEC PGM=.....
//*
// IF (STEP1.RC > 0) THEN
//STEP2 EXEC PGM=IEBGENER
//SYSUT1  DD DISP=SHR,DSN=MY.JCL(JOB2)
//SYSUT2  DD SYSOUT=(*,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF


or via a TSO SUBMIT:

Code:

//JOB1 JOB (....),CLASS=X,MSGCLASS=X
//*
//STEP1 EXEC PGM=.....
//*
// IF (STEP1.RC > 0) THEN
//STEP2 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SUBMIT 'MY.JCL(JOB2)'
/*
// ENDIF
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 489

PostPosted: Thu Aug 11, 2005 7:10 pm    Post subject: Re: Trigger a JCL
Reply with quote

HI
If ypu are using CA7 as schedular thet you can put following code in JCL to demad or trigger the job

//U7SVC1 EXEC PGM=U7SVC
//UCC7DATA DD *
/LOGON <Usrid>
DEMAND,JOB=JBXPGD96
/LOGOFF

Please correct me if I m wrong.

Regards
Rupesh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1