View previous topic :: View next topic
|
Author |
Message |
rpchandar
New User
Joined: 02 Sep 2005 Posts: 6
|
|
|
|
Hi,
I have a JCL, which has 15 Steps. Based on the return Code of step 5, I want to execute the remaining steps. If the the return code of step-5 is greater than 8, the remaining steps should not execute and the job should end. One way is to check for condition code from step 6 to step 15. Is there any other way? |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
This question is already discussed, make a search before posting.
Yes, of course but you must be sure that the same return code does not appair in the previous steps.
If you code your jobcard with COND=(8,EQ) your job will end if this condition is satisfied but only the first time.
This is a sample:
Code: |
//$MYJOB JOB 'accn',CLASS=X,COND=(8,EQ)
//STEP010I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=B
//SYSIN DD *
SET MAXCC=1
//STEP020I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=B
//SYSIN DD *
SET MAXCC=8
//STEP030I EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=B
//SYSIN DD *
SET MAXCC=1 |
and, in this case, the job is stopped after the STEP020I.
I hope in this help. |
|
Back to top |
|
|
rpchandar
New User
Joined: 02 Sep 2005 Posts: 6
|
|
|
|
Thanks for your help.
Regards,
Phani |
|
Back to top |
|
|
keler
New User
Joined: 20 Oct 2005 Posts: 1
|
|
|
|
If not sure the return code of previous steps is whether equal to 8 , you can add COND=(8,EQ,step5) to your jobcard from step 6 to step 15.
This is a example:
Code: |
//STEP6 EXEC PGM=***,COND=(8,EQ,STEP5)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
//STEP7 EXEC PGM=***,COND=(8,EQ,STEP5)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
....
//STEP15 EXEC PGM=***,COND=(8,EQ,STEP5)
//SYSPRINT DD SYSOUT=*
//SYSIN DD * |
Hope it useful
Regards |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 419 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
check the JCL manual for usage of IF ENDIF statements.
Dave |
|
Back to top |
|
|
|