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
 
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts self-restarting jobs in OPC jzhardy IBM Tools 1 Mon Aug 21, 2017 10:15 am
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm

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