MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Restart Logic in COBOL-DB2 program.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ahreddy
Beginner


Joined: 26 Jul 2006
Posts: 7
Topics: 3

PostPosted: Sun Oct 08, 2006 4:38 pm    Post subject: Restart Logic in COBOL-DB2 program. Reply with quote

Hi,

Would anyone please help me with the below issue.

How to code a restart logic in COBOL-DB2 program ( I don't want to use IMS checkpoint-Restart logic).

Think that the program is processing an input file consists of 2 million records accessing a DB2 table and updating the info.


Thanks and Regards,

AH.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 11182
Topics: 71
Location: San Jose

PostPosted: Sun Oct 08, 2006 8:10 pm    Post subject: Reply with quote

ahreddy,

1. Read the file
2. Update the db2 table. if sqlcode = 0 update parm table with the file record. or you can update a parm file with the record.

3. Repeat the process(1 &2) until you get an abend

4. Upon restart you need to read the parm table/file and then read the input file until you got the record from the input. The next record is the record you need to process.

5. Upon the successful completion of the job, delete the record from the table/ delete the parm file.

Hope this helps....

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
venus
Beginner


Joined: 02 Jun 2006
Posts: 16
Topics: 11

PostPosted: Mon Nov 06, 2006 1:51 am    Post subject: Reply with quote

hi ,

can i consider PARM TABLE as program internal table . if yes in case of abend and followed by restart , data in internal table is lost or not?

or can i consider this parm file as external dataset. if yes i understood your logic
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group