Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
JCL to set Return code when Time Out abend or Space Abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vinu78

Active User


Joined: 02 Oct 2008
Posts: 171
Location: India

PostPosted: Wed May 30, 2018 11:27 am    Post subject: JCL to set Return code when Time Out abend or Space Abend
Reply with quote

Hi All,

Is it possible to set return code when Time out abend (S322) or Space abend happens.
I would like to control the subsequent step based on this Return code, if previous step abends with Time Out or Space abend.

Thanks
Vinu
Back to top
View user's profile Send private message

steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 785
Location: The Universe

PostPosted: Wed May 30, 2018 12:15 pm    Post subject:
Reply with quote

It is probably not possible to convert an Sx22 ABEND to a return code. Nor is it desirable. These ABENDs imply job termination.

However, it is theoretically possible for a program to transform an Sx37 ABEND to a return code.

OS/360 architects decided an ABEND solution for an inability to perform a function rather than using a return code a program is unlikely to check, and even if checked, would the program do the "right" thing? I've thought about this for a long time and never reached a conclusion. vinu78 seems to think a *nix type environment (and environments influenced by *nix ,like Windoze) are preferable.

OS/360 represents an environment where much work runs in a way the initiator of the work is not around to influence the response to a problem (batch, in other words) as opposed to *nix, which denies the idea of batch operation.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8789
Location: Welsh Wales

PostPosted: Wed May 30, 2018 12:30 pm    Post subject:
Reply with quote

I know that you can use IF/THEN/ELSE for conditional processing based on ABEND, but AFAIK cannot specify a particular ABEND code
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 335
Location: Denmark

PostPosted: Wed May 30, 2018 12:56 pm    Post subject:
Reply with quote

You can test for a specific abend, like // IF ABENDCC=S322 THEN
Of course the TIME parameter must be on a step, otherwise the step to handle the abend also gets a S322.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8789
Location: Welsh Wales

PostPosted: Wed May 30, 2018 1:02 pm    Post subject:
Reply with quote

Hmmmmmmmmmmmmmmm

If the ABEND is S322 where do we get the extra time from to complete the job if the OS kills the job off icon_eyes.gif
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 335
Location: Denmark

PostPosted: Wed May 30, 2018 8:03 pm    Post subject:
Reply with quote

You can only trap for TIME set for step, the job time limit must of course be big enough for the remaining steps.
Sample:
Code:

//GO       EXEC RXINSTRM,TIME=(,1)
//REXX     DD *                   
 /* REXX */                       
 A=0                             
 DO 5000000                       
   A=A+1                         
 END                             
// IF ABENDCC=S322 THEN           
//T1       EXEC RXINSTRM         
//REXX     DD *                   
 /* REXX */                       
 SAY 'ABEND S322 DETECTED'       
// ELSE                           
//T2       EXEC RXINSTRM         
//REXX     DD *                   
 /* REXX */                       
 SAY 'ABEND S322 NOT DETECTED'   
// ENDIF                         
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2325
Location: NY,USA

PostPosted: Wed May 30, 2018 9:41 pm    Post subject:
Reply with quote

Quote:
Is it possible to set return code when Time out abend (S322) or Space abend happens.
I would like to control the subsequent step based on this Return code, if previous step abends with Time Out or Space abend.

Or why don't you put subsequent steps in another job and make that as successor to the current job ( Do only if that's a feasible option) ? In any case if current job abend because of any reason ( or time out in your case) then you can f/c it and the other job gets trigger and then you don't have to do anything.
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 Indent cobol code Renato Zangerolami COBOL Programming 6 Thu Feb 13, 2020 12:53 am
No new posts Eliminating blank space in XML parsed... elixir1986 COBOL Programming 0 Tue Feb 11, 2020 4:41 am
No new posts Using ICETOOL set return code as per ... Bhuvana Narasimhan DFSORT/ICETOOL 4 Fri Jan 24, 2020 12:58 pm
No new posts CP3KEXTR Setup- SYSTEM COMPLETION COD... mighty ABENDS & Debugging 7 Tue Dec 24, 2019 10:08 pm
No new posts Debug set up for COBOL module but ope... elixir1986 IBM Tools 1 Sun Dec 22, 2019 12:05 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us