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
 

 

Explain the COND parameter with the below example

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Explain the COND parameter with the below example
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: 1452
Location: Chicago, IL

PostPosted: Tue Aug 08, 2006 11:01 pm    Post subject: Re: Explain the COND parameter with the below example
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: 1228
Location: Israel

PostPosted: Wed Aug 09, 2006 3:46 pm    Post subject:
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    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 Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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