|
View previous topic :: View next topic
|
| Author |
Message |
VENKATA999 Warnings : 2 New User
.jpg)
Joined: 05 Jan 2006 Posts: 44
|
|
|
|
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 |
|
 |
priyesh.agrawal
Senior Member

Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|