Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
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    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

Prandip

New User


Joined: 04 Mar 2005
Posts: 85
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: 464

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Application not run by time HH:MM tri... jzhardy IBM Tools 1 Sun Apr 09, 2017 3:22 pm
No new posts How to track incoming input files tha... shreya19 JCL & VSAM 6 Thu Feb 25, 2016 6:15 pm
No new posts Issue in trigger vickey_dw DB2 3 Wed Feb 10, 2016 5:41 pm
No new posts Trigger a mainframe job by mail Praveen Thenraj IBM Tools 8 Wed Jan 13, 2016 12:05 pm
No new posts Setting up a new trigger krisprems DB2 4 Thu Dec 24, 2015 10:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us