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

Doubt in COND parm precedence?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Jun 24, 2010 3:00 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top