IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To send return code to Job from NATURAL Pgm without abending


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Mon Jan 29, 2007 12:16 pm
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
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: 2358
Location: Israel

PostPosted: Mon Jan 29, 2007 2:45 pm
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

Moderator Emeritus


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

PostPosted: Mon Jan 29, 2007 9:05 pm
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: 2358
Location: Israel

PostPosted: Tue Jan 30, 2007 12:06 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top