View previous topic :: View next topic |
Author |
Message |
tcdcit Beginner
Joined: 16 Sep 2003 Posts: 3 Topics: 2
|
Posted: Tue Sep 16, 2003 7:41 am Post subject: DB2Table & VSAM |
|
|
The problem is
DB2 Table and VSAM dataset containing the same data,means if there is any updation then it should be done on VSAM dataset also.
A JCL step is used to update both DB2 table and VSAM dataset.
Table and dataset is updataed on the particular step.
An abend occurs after the table gets updated but before the dataset is getting updated.What should be the remedy?What are all the precautions should be taken before executing such steps. |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Tue Sep 16, 2003 9:05 am Post subject: |
|
|
tcdcit,
Can you give some further details of how do you update the DB2 table and the VSAM file. Does the same batch COBOL program do it. In that case, check for all error conditions that can lead to a potential abend in your COBOL program after the db2 table updations are done (like open, write of vsam file etc.)....On encountering any such condition, issue a rollback of your db2 updations and gracefully abend your program.
Regards,
Manas |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12369 Topics: 75 Location: San Jose
|
Posted: Tue Sep 16, 2003 9:28 am Post subject: |
|
|
tcdcit,
It depends on how the updates to the table and vsam dataset are done. I would ideally do the DB2 update first and then unload the table and repro it to the vsam dataset.so the vsam dataset is always created fresh with the DB2 table data.so the steps would be as follows:
Code: |
STEP1: Update the DB2 table via program
STEP2: Unload the DB2 table
STEP3: REPRO the unload file to VSAM dataset using IDCAMS
|
or you can also choose this option
Code: |
STEP1: Unload the DB2 table data
STEP2: Modify the unload file with the updates to be done via easytrieve/utility
STEP3: LOAD the updated file to DB2 TABLE
STEP4: REPRO the updated file to vsam dataset
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
|
|