How to resolve PDT0320 AUTHORIZATION FAILED FOR BATCH UTILITY in Detector for Db2 for z/OS?
search cancel

How to resolve PDT0320 AUTHORIZATION FAILED FOR BATCH UTILITY in Detector for Db2 for z/OS?

book

Article ID: 446123

calendar_today

Updated On:

Products

Detector for DB2 for z/OS

Issue/Introduction

During execution of the Detector for Db2 for z/OS (PDT) batch report utility (PDTBATCH), the job fails with the following error message:
PDT0320 AUTHORIZATION FAILED FOR BATCH UTILITY DB2=ssid

This error occurs even when the user executing the job appears to have sufficient Db2 authority such as SYSADM.

Cause

The error typically indicates one of two conditions:
1.  Missing Plan Authority: The userid executing the batch job does not have EXECUTE authority for the required Detector Db2 plan (default plan name defined by PLANSxx member PDTPLN03 entry).
2.  Incorrect JCL Configuration: The batch JCL is defaulting to the standard PLANS00 member in hlq.CDBAPARM, but the subsystem requires a different plans member defined with a specific SUFFIX.

Resolution

Follow these steps to resolve the authorization failure:

Step 1: Grant Execute Authority
Locate the SQL member PDTSQTGR in the hlq.CDBASQL library. Execute the GRANT statements within this member for the affected Db2 subsystem. Specifically, ensure the userid
running the batch job has execute authority: GRANT EXECUTE ON PLAN plan_name TO userid;

Step 2: Identify the Correct Plan Name
If you are unsure of the plan name used by Detector in your environment:
1.  Open the hlq.CDBAPARM(PLANSxx) member (where `xx` is your suffix or `00` for default).
2.  Search for the string "PDT" to find the entry for PDTPLN03.

Step 3: Verify JCL Suffix (If applicable)
If your environment uses multiple subsystems with different plan names, you must specify the correct suffix in your JCL to point to the right PLANSxx member.
Modify the EXEC statement as follows:
//STEP1 EXEC PGM=PTLDRIVM,PARM='EP=PDTBATCC,SUFFIX=xx'
(Replace `xx` with the two-character suffix that matches your hlq.CDBAPARM PTISYSxx member)