Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Coding COND parm

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

New User


Joined: 24 Mar 2010
Posts: 61
Location: Cape of Good Hope

PostPosted: Wed Aug 28, 2013 9:22 am    Post subject: Coding COND parm
Reply with quote

Hello
I have following steps in JCL which are cobol DB2 programs. The first 4 programs can conditionally set a return code of 5. If any of the first 4 programs sets a RC of 5 then the fifth program should execute. The fifth program should not execute for any other return code.

Pseudo JCL

Step1 - COB prog1
Step2 - ABEND if prog1 has any other return code apart from 5
Step3 - COB prog2
Step4 - ABEND if prog2 has any other return code apart from 5
Step5 - COB prog3
Step6 - ABEND if prog3 has any other return code apart from 5
Step7 - COB prog4
Step8 - ABEND if prog4 has any other return code apart from 5
Step9 - COB prog5
Step10 - ABEND if prog5 has any other return code apart from 0

Tried every combination of COND parameter but no avail. How can this be achieved without using IF THEN/ELSE and using only COND parm?
Back to top
View user's profile Send private message

expat

Global Moderator


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

PostPosted: Wed Aug 28, 2013 11:38 am    Post subject:
Reply with quote

COND= works only on OR conditions when a combination is specified
Back to top
View user's profile Send private message
rocky_balboa

New User


Joined: 24 Mar 2010
Posts: 61
Location: Cape of Good Hope

PostPosted: Wed Aug 28, 2013 11:49 am    Post subject:
Reply with quote

Thanks expat. I had this in my mind but could not get a confirmation from the manuals. Will need to redesign !!!
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 271
Location: Mumbai

PostPosted: Wed Aug 28, 2013 4:50 pm    Post subject: Re: Coding COND parm
Reply with quote

Hi,

rocky_balboa wrote:
Step1 - COB prog1
Step2 - ABEND if prog1 has any other return code apart from 5

Correct me if I am wrong here.

You want to check return code from Step1 and if its 5 then only continue to next step else Abend

I hope you have some mechanism or program for Abending the job at your shop

See if below code helps
Code:
Step1 - COB prog1
Step2 - ABEND PROGRAM,COND=(5,EQ,STEP1)


Here it will bypass Step2 only if Step1 returned code as 5

Regards,
Chandan
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu Aug 29, 2013 9:03 am    Post subject:
Reply with quote

Why the aversion to IF/THEN/ELSE? Many manuals recommend it over the older and oftentimes misread COND parameter.
Back to top
View user's profile Send private message
Scott Lippincott

New User


Joined: 07 May 2010
Posts: 2
Location: Philadelphia, PA

PostPosted: Thu Sep 19, 2013 10:15 pm    Post subject: Reply to: Coding COND parm
Reply with quote

Hello,
I may be missing the point here, but if any of your steps (1,3,5,7) do not return a condition code of 5, the job will terminate in the following "ABEND" step. Nothing else will execute. By the time you get to step 9, ALL of the condition codes from steps 1,3,5,and 7 will have been 5.
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: Fri Sep 20, 2013 12:17 am    Post subject:
Reply with quote

Hello and welcome to the forum,

It appears our TS (Topic Starter) has floated away (happens all too often) with no followup.

Nope, i don't believe you're missing anything from what we have to work with.

Possibly TS will come back with an update.
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 Duplicate PARM on OUTFIL sancraig16 SYNCSORT 11 Thu Apr 05, 2018 10:25 pm
No new posts IPCONFIG SEGMENTATIONOFFLOAD parm in ... Keith Hays TSO/ISPF 0 Wed Jan 03, 2018 11:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us