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

Restarting a terminated natural Program


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Wed Aug 01, 2007 5:50 pm
Reply with quote

Hi All,

As we can code TERMINATE <nn> to terminate a program conditionally (usually) is there any statements that can be used to restart a natural program after termination by a TERMINATE statement?

E.g.

At Line No 2000:
IF #REC-TYPE NE 'D'
TERMINATE 99
ELSE
<SOME OTHER STATEMENTS>
END-IF


Can we restart the same program after the conditional statement when executing for 2nd time (not from the top).


Thanks
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: Wed Aug 01, 2007 8:00 pm
Reply with quote

Hello,

If you want to "restart" an abended or terminated run, you need to provide the mechanism to do so - it is not automatic.

Usually, it is quicker and safer to restart from the beginning. If your requirement includes restart/recovery processing, you need to talk with others on your project and/or your dbs(a) to see how this is handled on your system. When you implement, your process should be similar to other processes that provide restart capability.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Aug 01, 2007 11:52 pm
Reply with quote

The data supplied after the END TRANSACTION statement can be used after restart with the GET TRANSACTION DATA statement to continue processing from a syncpoint.

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

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Thu Aug 02, 2007 10:20 am
Reply with quote

Hi Ofer,

If Get Transaction Data is one option, I am still confused on how to go.
Once the program is terminated, the natural session also terminates and there will not be any dta retained for a restart.

How can this be possible. No automated process required.
If we can set any indicator, to be checked before start of the program and conditionally start from the beginning or from a specific statement.

Fact is that it was an Interview question. icon_smile.gif
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 Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top