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

Explain the COND parameter with the below example


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VENKATA999
Warnings : 2

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Tue Aug 08, 2006 8:23 pm
Reply with quote

Hi Friends ,

I read in the book , jobstmt cond code nullifies the specification on the exec stmt .

when i was trying with some mode program like below
Code:

//XXXXX19 JOB CARD   
//          NOTIFY=&SYSUID,MSGLEVEL=(1,1),TIME=(2,10),COND=(0,NE)
//STEP01   EXEC PGM=IEFBR14                                         
//DDNAME1  DD DSN=XXXXXX.NEW.SIX,
//                           DISP=(NEW,CATLG,DELETE),           
//                          SPACE=(1,(1,1),RLSE),                               
//                     DCB=(RECFM=F,LRECL=30,BLKSIZE=300)                   
//STEP02   EXEC PGM=IEFBR14,COND=(0,EQ)                             
//DDNAME2  DD DSN=XXXXXX.NEW.SIX,
                   DISP=(OLD,DELETE,DELETE)           
//                                                                                                               


As per theory , if first step run sucessfully return code is 0 ,so 0 eq 0 true , so step 2 should not run if it consider steplib cond code , if it consider job cond code , step 2 should run because 0 not equal to 0 , false . For me second step is not running .

can any one explain this clearly to me with an example code .

Thank you,
Venkata .
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Tue Aug 08, 2006 11:01 pm
Reply with quote

Venkata,

COND=(0,EQ) at STEP2 says DO NOT RUN STEP2 if any return code from any of the steps above STEP2 is equal to 0.

Thus STEP2 isn't being executed when STEP1 is going fine.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 09, 2006 3:46 pm
Reply with quote

The "MVS JCL Reference" says:
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
ignores any EXEC statement COND parameters.

If the tests on the JOB statement are not satisfied, the system then performs the return code tests on the
EXEC statement. If an EXEC return code test is satisfied, the step is bypassed.

The JOB COND nullify the EXEC COND only if the JOB COND comes true.

You're right, in your example, STEP02 is never executed.
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts DB2 Statistics - Using EXPLAIN and qu... DB2 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
Search our Forums:

Back to Top