Q. We have a COBOL DB2 Program which reads records from a file A.
Updates DB2 table with a value from input file. Updates another VSAM file B by adding value from input file to a field in the VSAM file B.
Now suppose the job abends after updating N records.
How will you resume the job and proceed ahead.
Note : The developer forgot to take back up of file and DB2 before running the job.
DB2 + File update
-
sinmani
- Posts: 93
- Joined: Thu Mar 22, 2012 10:02 am
- Skillset: COBOL
CICS
JCL
DB2
VSAM
IMS - Referer: INTERNET
DB2 + File update
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
-
enrico-sorichetti
- Global moderator
- Posts: 3011
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: DB2 + File update
Note : The developer forgot to take back up of file and DB2 before running the job.
if You can exactly determine the N and the updates are reversible computations and/or file inserts
just write a program reversing the computations an deleting the extra record inserts
REMEMBER TO PROCESS THE INPUT RECORDS BACKWARDS
(consider what would happen if you had taken a decision based on a previous update )
if You cannot determine exactly the N and the updates are not reversible ( E.G. string substitutions ) or file deletes
You will have to travel on a long and windy ant thorny road for reconciliation
if You did not issue any commits an abed will rollback all the db2 changes, so DB2 should be clean, but beware ...
and in any case something will come back later to bite Your ***
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Similar Topics
- Replies
- Views
- Last post
-
- 3
- 8604
-
by sergeyken
View the latest post
Sun May 01, 2022 11:26 pm
-
-
Need to check whether file is ESDS file or not by using REXX
by Devrana » Sat Oct 05, 2024 2:28 pm » in CLIST & REXX - 11
- 8959
-
by willy jensen
View the latest post
Sat Aug 02, 2025 7:16 pm
-
-
- 6
- 3564
-
by sergeyken
View the latest post
Sun Oct 22, 2023 6:58 am
-
- 24
- 14118
-
by Pedro
View the latest post
Wed Jan 04, 2023 5:59 am
-
- 6
- 3025
-
by sergeyken
View the latest post
Wed Apr 13, 2022 7:01 pm