Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums 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: 155
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: 657
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: 8704
Location: Back in jolly old England

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: 218
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: 8704
Location: Back in jolly old England

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: 218
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: 1968
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 How to control the elapsed time for a... Philippe JCL & VSAM 12 Thu Aug 09, 2018 5:54 pm
No new posts Invoke WebService failing with respon... Ashishpanpaliya CICS 1 Thu Aug 09, 2018 3:14 pm
This topic is locked: you cannot edit posts or make replies. IO-PCB status code AL srinianusuya IMS DB/DC 1 Mon Aug 06, 2018 10:26 am
No new posts SQL Code 302 while executing stored ... Ashishpanpaliya DB2 8 Wed Aug 01, 2018 7:54 pm
No new posts sql code 331 while calling Stored Pro... Ashishpanpaliya DB2 5 Wed Aug 01, 2018 7:06 pm

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