View previous topic :: View next topic |
Author |
Message |
ahreddy Beginner
Joined: 26 Jul 2006 Posts: 7 Topics: 3
|
Posted: Sun Oct 08, 2006 4:38 pm Post subject: Restart Logic in COBOL-DB2 program. |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12357 Topics: 75 Location: San Jose
|
Posted: Sun Oct 08, 2006 8:10 pm Post subject: |
|
|
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
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
venus Beginner
Joined: 02 Jun 2006 Posts: 16 Topics: 11
|
Posted: Mon Nov 06, 2006 1:51 am Post subject: |
|
|
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 |
|
|
|
|