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
 

 

STOP a job from triggering another job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
navita

New User


Joined: 13 Apr 2009
Posts: 2
Location: pune

PostPosted: Mon Apr 13, 2009 1:27 pm    Post subject: STOP a job from triggering another job
Reply with quote

Hi,

Trigger a JCL

I am using CA7, but I want to do the opposite..ie, STOP a job from triggering another job.
Details: Job A generates a file x, and then triggers job B.
but if there is some problem with this file, then job B abends.
I want to stop job B from executing if there is some problem with the header/trailer of file x, or if file x is not present ( which happens sometimes).
But CA7 automatically triggers job B after job A.
And I dont want to make any changes in CA7,
so is there a way to stop job B from getting executed if job A failed to create the file, through JCL only?
thanx a lot.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 13, 2009 1:32 pm    Post subject:
Reply with quote

Probably just another example of bad design.

If JOB1 had proper control checking then JOB1 would abend / issue a return code which would automatically stop JOB2 from processing.
Back to top
View user's profile Send private message
navita

New User


Joined: 13 Apr 2009
Posts: 2
Location: pune

PostPosted: Mon Apr 13, 2009 1:42 pm    Post subject:
Reply with quote

true icon_smile.gif

but we wont have much work in maintainence projects, if it wasnt for bad designs icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 13, 2009 3:52 pm    Post subject:
Reply with quote

Hi,

If I understood correctly - Job B is Data-set (X) triggered JOB, and X is created in Job A?

You can create one more job, Job X, which can be used as predecessor of Job B but successor of JOB A. Once Job A creates DSN "X", "perform" (using COBOL or SORT or . . .) all the "checks" on this DSN which you want to before initiating Job B or instead of this new Job X, Job A can be modified to have the functionalities of Job X.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 13, 2009 3:55 pm    Post subject:
Reply with quote

navita wrote:
true icon_smile.gif
but we wont have much work in maintainence projects, if it wasnt for bad designs icon_smile.gif

But then, the client would not have to pay for the inefficiencies of others icon_evil.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Apr 14, 2009 2:58 am    Post subject:
Reply with quote

Hello,

Quote:
but we wont have much work in maintainence projects, if it wasnt for bad designs
Opinions vary . . .

If it wasn't for poor design, more time could be spent providing functions of value rather than trying to survive a poor implementation. . .

And if things seem "poorly done" now sometimes, just wait a few more years as an increasing number of systems are being written/maintained by people who do not understand the business processes for the application, do not understand the technology used, and believe major parts of a system should be implemented "with a JCL".
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Wed Apr 15, 2009 3:19 pm    Post subject: STOP a job from triggering another job
Reply with quote

Hi ,

You can opt for the below :

> Run (or ask your support team) the job B based on the RC (Return Code) of the job A . You need to set OPC or CA7 variables/parameters for this in your JCLs .

> Else you can have manual hold on the job B and release it once the Job A but this is not an efficient option since the manual interaction is needed which is not recommended we are having other options .

Hope This helps ...!!!
Back to top
View user's profile Send private message
jsathishbabu84

New User


Joined: 07 Jun 2007
Posts: 22
Location: India

PostPosted: Mon Apr 20, 2009 3:51 pm    Post subject: Reply to: STOP a job from triggering another job
Reply with quote

Hi,

In Job A, write a program to give a return code when the file X generated in the job is invalid (Invalid Header/Trailer) or see if u can achieve it using Sort.

Using the return code of the above step, Trigger the next job.
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 Stop Process when file is empty Roland Brosio DFSORT/ICETOOL 4 Thu Jun 25, 2015 1:20 pm
No new posts Urgent Issue: Stop the execution of R... ezhavendhan TSO/ISPF 3 Mon Aug 26, 2013 5:21 pm
No new posts Triggering txn via MQPUT but no incre... MadanVS CICS 1 Wed Aug 07, 2013 7:31 pm
No new posts Triggering a CA7 job through JCL dipsybaby CA Products 1 Fri Jul 19, 2013 3:15 pm
No new posts Stop reading input file based on a co... David Sde DFSORT/ICETOOL 9 Fri Feb 22, 2013 1:10 am


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