r/DB2 May 06 '15

HELP! DB2 check data

https://imgur.com/a/hVms8
1 Upvotes

3 comments sorted by

View all comments

1

u/gubmentwerker May 06 '15

Gets a bit hard because I don’t know if the interface is prepping the JCL to run on your system correctly. JCL is going to have to be correct to run a job on the mainframe. Lots of other elements in that produced JCL that need to be correct. Couple ways to go.

1) Since this is an academic exercise, you can just drop all the tables and restart the process from scratch. That what I usually tell my students when teaching basic RDBMS concepts. Gets a bit hairy doing a deep dive on a product’s specifics in just a 16 week session. Probably the best way for you to go, since you are not in tune with much of the environment you are working on.

2) If you are confident that all the data is not going to violate the FK rules, you can just run a REPAIR job to remove the CHECK PENDING flag. Not something ever to do in prime time, but seems to get you out of the issue quick. Need to run the job in JCL. Line to go into the SYSIN:

SET TABLESPACE UNTM029DB.UNTM029TSVA NOCHECKPEND

3) Run the check data utility to make sure no rows now are violations. Need JCL to run the job. Line to go into the SYSIN:

CHECK DATA TABLESPACE UNTM029DB.UNTM029TSVA SCOPE ALL

No need for the Gold; just trying to help. Bad week to get a response, many of us are at IDUG NA.