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

RETURN Code checking problem


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

New User


Joined: 14 Apr 2008
Posts: 7
Location: chennai

PostPosted: Thu May 14, 2009 2:12 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu May 14, 2009 2:52 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu May 14, 2009 3:30 pm
Reply with quote

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
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Thu May 14, 2009 5:41 pm
Reply with quote

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
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top