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: 992
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


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