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
 

 

To send return code to Job from NATURAL Pgm without abending

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
Sangita

New User


Joined: 02 Jun 2005
Posts: 17

PostPosted: Mon Jan 29, 2007 11:52 am    Post subject: To send return code to Job from NATURAL Pgm without abending
Reply with quote

Hi All,
Please let me know how to return a code to the job from Natural PGM like we do in COBOL without abending the job. If we use TERMINATE statement with code >0, then it will abend, which I dont want to happen & STOP will stop the process but does not return any code. I want to skip the processing of subsequent steps after the NATURAL Pgm depending on the return code from the PGM. Please let me know how we can do it?
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jan 29, 2007 12:16 pm    Post subject:
Reply with quote

You are correct that you can't set RETURN-CODE like in COBOL; however, for me, TERMINATE in batch simply ends the job with the return code I supplied.

O.
Back to top
View user's profile Send private message
Sangita

New User


Joined: 02 Jun 2005
Posts: 17

PostPosted: Mon Jan 29, 2007 2:06 pm    Post subject: Hi
Reply with quote

Hi,
Is there any other way to return code in Natural other than TERMINATE statement? If u have please send me with ex. Also, send me the code for which ur jot getting an abend.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Jan 29, 2007 2:45 pm    Post subject:
Reply with quote

There is no method in NATURAL to put values in registers.

Here is my example, which ends the job with RC=13:
Code:
TERMINATE 13
END


O.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jan 29, 2007 9:05 pm    Post subject:
Reply with quote

Hello Sangita,

Please post the abend information you get when you issue the terminate. It will be in one or more of the sysout datasets.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 30, 2007 12:06 am    Post subject:
Reply with quote

The default is CMPRINT, but it may also be in CMPTR01.

O.
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 -> Java & MQSeries 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 Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm


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