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: 994
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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am


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