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
 

 

Commit/Restart logic in CICS programs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
chandu.be

New User


Joined: 17 Jul 2006
Posts: 9
Location: Bagalore

PostPosted: Wed Jun 18, 2008 5:26 pm    Post subject: Commit/Restart logic in CICS programs
Reply with quote

Hi,

Can any body explain me how we can implement Commit/Restart logic in CICS programs.

My scenario is as follows:
I have an input and output file. If my program get abends after processing 50 records. How can i make sure that my program will start running after sometime and it will starts processing from 51st record.


Thanks & Regards,
Chandu
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 18, 2008 5:40 pm    Post subject:
Reply with quote

INPUT file and OUTPUT file? in CICS? are you using TDQ's?

as in batch (where is sounds as if this program belongs), you have to keep track of what you have read and processed AND you have to save this info someplace (a db2 table, vsam file).

Your program needs to check this save area upon program start, and determine where you are in the processing. for example: if record count is zero, you would start at the begining. If the record count > 0 then you need to position your input and then start.
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 89

PostPosted: Wed Jun 18, 2008 7:40 pm    Post subject: Reply to: Commit/Restart logic in CICS programs
Reply with quote

We have to posses a variable to count the no of records that are processed succesfully before the program gets abends .Actually the Program logic should start as Program initilzation of all defined
variables (where count variable declared ) and the program logic
should start with READ TDQ and a check . Then move it to the count variable and after each sucessfull process of record we need to write count variable in TDQ and once the program abends when we restart the same program and once it comes for the program logic READ TDQ is executed again and it contains last sucessfull processed record (count) then check for the count variable if it is greater than > 0 then increment the count = count + 1( to avoid the abend) and then logic is same as above will be excuted again.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 18, 2008 10:39 pm    Post subject:
Reply with quote

You need to review "Dynamic transaction backout" as well as SYNCPOINT API's, UOW (Unit of Work), etc.

These facilities are all documented in the CICS manuals for your given version/release and can be very complicated to explain in a posting.

Bill
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 0 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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