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
 

 

RETURN Code checking problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: RETURN Code checking problem
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu May 14, 2009 2:52 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Thu May 14, 2009 3:30 pm    Post subject: Reply to: RC problem
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    Post subject:
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    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 EXIT or RETURN cvnlynn CLIST & REXX 16 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm


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