Pages

Showing posts with label db2. Show all posts
Showing posts with label db2. Show all posts

Friday, July 26, 2019

Fixing DB2 Index Errors

Incident: Index error when DB2 loads a table.

Steps:

  1. REORG INDEX - this was successful but did not fix index error
  2. REORG TABLE - UNLOAD went ok, LOAD was had error
  3. DROP INDEX - failed because index is used as PRIMARY KEY
  4. ALTER TABLE and DROP PRIMARY KEY - successful
  5. DROP INDEX - successful
  6. LOAD TABLE REPLACE - successful
  7. Defined VSAM data set for INDEX
  8. CREATE INDEX - index error
  9. Sorted unload records and found there were duplicate records. How these got there is anyone's guess.
  10. SORTED records and removed duplicate records
  11. LOAD TABLE REPLACE again using file with unique records
  12. CREATE INDEX - successful
  13. ALTER TABLE CREATE PRIMARY KEY - successful

Tuesday, April 23, 2019

z/OS Compiling Programs that Use DB2 or CICS

In our previous article: z/OS Compile Process, we talked of the basic Compile process. On the mainframe though, you can write programs that call other subsystems, like a database system (ie. DB2) or a transaction system (ie. CICS).

Total Pageviews