Thursday, August 16, 2012

DSNTEP2 stops after MAXERRORS limit reached


Problem description:
This happened when I was using multiple insert script through program DSNTEP2. Idea was to insert the record if that is not present in table.

The execution gave me MAX CC 0008. I knew that some inserts are going to fail due to duplicate record.

Observation: The number of insert statement executed was 10 out of 100. All were failed due to duplicate records.

Question: Why the utility did not process rest of the statement.

Here is why:

There is a parameter which controls the maximum error the DSNTEP2 will encounter before exit. This Parameter is MAXERRORS.

The default value for this parameter is 10.


We can override the default value for MAXERRORS as shown below or to a specific definite number.


You can embed this command at the begin of the control card statement like


INSERT INTO tablex VALUES('a',1,'x');

So on...

Prakash C. Singh
IBM Certified DBA

No comments: