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
 

 

Restarting a terminated natural Program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Restarting a terminated natural Program
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

Site Director


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

PostPosted: Wed Aug 01, 2007 8:00 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Wed Aug 01, 2007 11:52 pm    Post subject:
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    Post subject:
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    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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
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