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
 
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: 6968
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

Active User


Joined: 29 Jun 2005
Posts: 118

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: 2504
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 ASP3 ABEND IN CICS Vedant CICS 0 Fri Oct 20, 2017 3:18 pm
No new posts Identifying Interfaces in CICS/mainframe Ashishpanpaliya CICS 5 Fri Oct 13, 2017 3:21 pm
No new posts pointers on using USS and C programs. Pedro All Other Mainframe Topics 0 Wed Oct 04, 2017 4:38 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

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