We got a call from development team that they are getting ABEND S04E while running DSNUTILB. When I looked in the reson code.. it is REASON=X'00E40002'.
The complete error message is "DSNU016I DSNUTILB - UTILITY BATCH MEMORY EXECUTION ABENDED, REASON=X'00E40002'"
Initial investigation shows the tablespace is not accessable enven if all the index and tablespace is in RW status. When I try to execute a query like "Select count(*) from T1FHHD; it excuted fine. But when I tried to run a query like: "Select * from T1FHHD fetch first 1 row only". It gave me below message in DSN2MSTR
STC00720 DSNI014I + DSNIRNXT DATA IN USE DURING ABEND 219 REASON 00C90101
NAME DSPS02 .SFHHD .X'00000002'
STC00720 DSNI014I + DSNIRNXT DATA IN USE DURING ABEND 220 REASON 00C90101
NAME DSPS02 .SFHHD .X'00000001'
From this we can determine that there is a data corruption in page 1 and 2 of the tablespace. Since it is test system, we dopped/recreated and refreshed the data from production and told the development team to rerun the job.
Again they came back with same error.
Now my focus directed to the APF authentication Library as the reson code tells: 00E40002
Explanation: The caller of the database services portion of the utilitywas in the wrong protect key.
If a JOBLIB or STEPLIB is being used in the batch utility job, check thatall application program libraries included in the concatenation are authorized.
Check that the batch utility program DSNUTILB was included in the MVS program properties table during the installation of DB2. The entry for DSNUTILB in the MVS program properties table was provided by MVS.
The steplib coded for the step as below:
STEPLIB DD DSN=TSYS.STEST.BATCH.LOADLIB,DISP=SHR
When I looked into SYS1.PARMLIB(PROG00), I could not find TSYS.STEST.BATCH.LOADLIB in it. So this Library is not APF authorised. If one of the concatenated pds is not authorized, then whole steplib will not be authorized.
There are 2 options for this:
To modify SYS1.PARMLIB(PROG00)
by putting this line:APF ADD DSNAME(TSYS.STEST.BATCH.LOADLIB) VOLUME(SSD001) -- code appropriate volume.
After that you need to refresh the parmlib by giving spool command /set prog=00
you can have a look at SYS1.PARMLIB(SCHED00)
PPT PGMNAME(DSNUTILB) /* DB2 UTILITY */ CANCEL /* CAN BE CANCELLED */
KEY(7) /* PROTECTION KEY */
NOPRIV /* NOT PRIVILEGED */
SWAP /* SWAPPABLE */
DSI /* DATA SET INTEGRITY */
PASS /* NO PASSWORD BYPASS */
NOSYST /* SYSTEM TASK , NOT TIMED */
AFF(NONE) /* NO PROCESSOR AFFINITY */
This is to verify whether we have KEY(7) which otherwise will give protect key issue. Check this SYS1.IPLPARM(LOAD00) whether you are looking into correct parm: This will look like below:You will definitly find "PARMLIB SYS1.PARMLIB" as first occurence.
IODF 40 MVS1 PROD 00
We can remove the TSYS.STEST.BATCH.LOADLIB from the STEPLIB as it does not include load of IBM supplied utility DSNUTILB.So that we will not get the true APF authorization error with 00E40002.
Option 2 is better one as it does not require intervention of system programmer and pretty quick to achieve.
IBM Certified DB2 DBA