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

Trigger a JCL


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

New User


Joined: 13 May 2005
Posts: 7

PostPosted: Thu Aug 11, 2005 12:20 pm
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
Prandip

New User


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

PostPosted: Thu Aug 11, 2005 4:07 pm
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: 463

PostPosted: Thu Aug 11, 2005 7:10 pm
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
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 define transaction that trigge... CICS 3
No new posts Trigger mainframe job , when file pla... All Other Mainframe Topics 2
No new posts trigger enter key automatically call ... CICS 17
No new posts Application not run by time HH:MM tri... IBM Tools 1
No new posts How to track incoming input files tha... JCL & VSAM 6
Search our Forums:

Back to Top