Friday, November 14, 2008

DSNUTILB - UTILITY BATCH MEMORY EXECUTION ABENDED, REASON=X'00E40002'

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
ERQUAL 53CB
TYPE 00000302
NAME DSPS02 .SFHHD .X'00000002'
CONNECTION-ID=TSO
CORRELATION-ID=TSGDBT1
LUW-ID=*
STC00720 DSNI014I + DSNIRNXT DATA IN USE DURING ABEND 220 REASON 00C90101
ERQUAL 53CB
TYPE 00000302
NAME DSPS02 .SFHHD .X'00000001'
CONNECTION-ID=TSO
CORRELATION-ID=TSGDBT1
LUW-ID=*
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
DD DSN=SYS1.DSN2.SDSNLOAD,DISP=SHR
DD DSN=SYS1.SDSNLOAD,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:
Option 1:
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
NUCLEUS 1
NUCLST 00
SYSCAT MVSC70133CCATALOG.ICFM.VMVSC70
PARMLIB SYS1.PARMLIB
PARMLIB CPAC.PARMLIB
PARMLIB SYS1.IBM.PARMLIB
IEASYM 00
SYSPLEX SOMPLEXP

Option 2:
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.

Conclusion:
Option 2 is better one as it does not require intervention of system programmer and pretty quick to achieve.

Cheers...
Prakash
IBM Certified DB2 DBA

No comments: