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
-
- 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
-
- Global moderator
- Posts: 3006
- 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
- 6732
-
by sergeyken
View the latest post
Sun May 01, 2022 11:26 pm
-
-
PCOMM 64-bit Automation Macro failing to update WindowsTitle
by suriPCOMM » Tue Aug 31, 2021 5:33 am » in Simulators & Emulators - 0
- 7947
-
by suriPCOMM
View the latest post
Tue Aug 31, 2021 5:33 am
-
-
- 1
- 1767
-
by sergeyken
View the latest post
Fri Mar 26, 2021 11:59 pm
-
-
EZIOE004 Logical I/O error on file occurred reading VB file
by savitha_y » Mon Feb 15, 2021 7:54 pm » in CA-Easytrieve - 3
- 4952
-
by savitha_y
View the latest post
Wed Feb 17, 2021 5:02 am
-
-
-
File Handling 3 input files and 1 output file by using EZT
by pavan426 » Thu Sep 09, 2021 12:17 am » in CA-Easytrieve - 0
- 4413
-
by pavan426
View the latest post
Thu Sep 09, 2021 12:17 am
-