View previous topic :: View next topic
|
Author |
Message |
depakjan
New User
Joined: 14 Apr 2008 Posts: 7 Location: chennai
|
|
|
|
Hi guys,
i have a problem with my JCL, here if the PS0050 got skipped due to condition codes, wat will hapen to below step...
for me this step is getting executed and the program is abending, but if PS0050 is skipped i want this below also to be skipped.. how do i code this?
Code: |
IF PS0050.RC GT 4 THEN
PS005A EXEC PGM=ABENDPGM
ENDIF |
[/code] |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I think you need to include the condition code check for the step that caused PS0050 to be skipped.
e.g. IF (somestep.RC = nnn | PS0050.RC GT 4) THEN
PS005A EXEC PGM=ABENDPGM
ENDIF
Garry. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Depak,
Quote: |
but if PS0050 is skipped i want this below also to be skipped.. how do i code this? |
Use the same condition that was checked for PS0050 with an OR condition.
Code: |
IF (samestep.RC = nnn | PS0050.RC GT 4) THEN
PS005A EXEC PGM=ABENDPGM
ENDIF
where samestep's RC was checked before executing PS0050 |
|
|
Back to top |
|
|
mtaylor
Active User
Joined: 20 Feb 2009 Posts: 108 Location: Kansas City
|
|
|
|
You can use the ¬RUN (step was not run) condition for a step. See the IF/THEN/ELSE/ENDIF chapter in the JCL Reference. |
|
Back to top |
|
|
|