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

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 CICS to Webservices safexc CICS 1 Sun Jan 22, 2017 5:49 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 3 Thu Jan 19, 2017 1:31 am
No new posts INDEPENDENT CICS TS 4.1 MRO REGION UP... Kyle Carroll CICS 0 Wed Dec 14, 2016 6:55 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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