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
 

 

Doubt in COND parm precedence?

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

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Jun 24, 2010 2:39 pm    Post subject: Doubt in COND parm precedence?
Reply with quote

//XXXXXR JOB (X-XXXX-XXXX),COND EX1',
// CLASS=H,MSGCLASS=T,
// TIME=(,),REGION=0K,
// NOTIFY=&SYSUID,USER=&SYSUID,COND=(1,LT)
//*
//*
//DEL1 EXEC CA11RMS,TYPRUN='F'
//*
//*
//DEL2 EXEC CA11RMS,TYPRUN='F',COND=(0,EQ)
//*
//*
//DEL3 EXEC CA11RMS,TYPRUN='F'
//*

In this case DEL1 completes with CC=0 and it should execute the DEL2 and DEL3 since i coded COND=(1,LT) But system skips DEL2 while execution.

I believe the COND coded in JOB statement will override the COND in exec statement. But in this case it works in reverse way icon_sad.gif

Someone pls clarify this

Thanks.
Yuge
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: Thu Jun 24, 2010 3:00 pm    Post subject:
Reply with quote

What does it say in the JCL reference manual.
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Jun 24, 2010 3:21 pm    Post subject: Reply to: Doubt in COND parm precedence?
Reply with quote

If you code the COND parameter on the JOB statement and on one or more of the job's EXEC statements, and if a return code test on the JOB statement is satisfied, the job terminates. In this case, the system does not process any subsequent EXEC statement COND parameters.

This is what i got regarding precedence..

I need a little clarification on that.. If in a job having 5 steps

JOB COND = False always
Step1
Step2 COND = True
Step3
Step4 COND = False
Step5

Then the job will execute as per the EXEC COND till JOB cond is false. So here EXEC cond takes precedence over JOB COND.

If JOB cond fails at any step then it will not check for further EXEC cond. So the precedence comes only if JOB cond becomes true, at that point of time JOB COND takes precedence and skips all further steps.

Why i m asking this because when i googled the same, It is given like JOB COND takes precedence over EXEC COND. So I thought that if JOB COND is always false then it should execute all the steps irrespective of the EXEC COND.
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Jun 24, 2010 3:48 pm    Post subject:
Reply with quote

Pls try this and let me know
//DEL2 EXEC CA11RMS,TYPRUN='F',COND=(0,NE)
Back to top
View user's profile Send private message
yugendran

New User


Joined: 14 Dec 2007
Posts: 51
Location: indore

PostPosted: Thu Jun 24, 2010 7:04 pm    Post subject:
Reply with quote

@Vishu...All the steps got executed from DEL1 to DEL3

Actually system will check the JOB COND, if it is false then EXEC COND will be evaluated.
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 Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts COND parameter vs IF THEN ELSE Alks JCL & VSAM 11 Fri Jun 17, 2016 5:28 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am


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