Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to position the cursor in cobol-cics-db2 prog

Status
Not open for further replies.

ding1000ma

Programmer
Sep 2, 2001
10
0
0
US
Hi,
When cobol-cics-db2 program abends when doing some function how to position the cursor after the abend? Do we need to use RD in JCL or any other way?
Can any one help for the above question.
Thanks,
Ding
 
Ding,
The best way to do this would be to write the key of the last record read/committed to a CICs TSQ which could be retrieved and read again on re-entry. Your program's SQL would need to be written to be able to cope with this re-positioning.

Are you performing a process, committing the data, and then continuing processing, after which you abend? I am assuming this is the case, otherwise I can't see why you would want to re-position after an abend.

Marc
 
I agree with the other post but would like to add that it DEPENDS on the error!!!!

I recently did a technical phone interview and was asked the difference between a -911 and a -913.

The difference is that 1 was an abend where the data was rolled back and the other the data was NOT rolled back!!!!

I would look around at the company and see if anybody else has coded something similar. There are even purchased packages for such things.

The coding isn't particularly difficult but it does need to be well though out and well tested.
 
yarnseeker,

if your running under CICS and you have ROLLBE=YES defined in the RCT you will get -911. The data will be rollbacked to the last synchpoint.

IF your running under CICS and you have ROLLBE=NO defined in the RCT you will get -913. The data is not rolled back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top