Running the second job in Datacom INSTJCL member IVPNEW03 to remove the SQLDEMODB gets an error trying to execute -DEL AUTHORIZATION,DEMOEMPL:
DDPSD20001 INVALID DELETE - ACTIVE AUTHID
What needs to be done to resolve this?
z/OS
Datacom 15.1
The documentation for error message DDPSD20001 explains the problem and how to resolve this:
INVALID DELETE - ACTIVE AUTHID
Reason:
The PRODuction status AUTHORIZATION occurrence with an AUTH-USAGE attribute-value of S cannot be deleted because one or more entity-occurrences use that authorization as the AUTHID.Action:
Either delete the entity-occurrences in Datacom Datadictionary that use the AUTHID or change their relationship to the AUTHORIZATION entity-occurrence.
To determine the PRODuction status entity-occurrences related to the AUTHID, run a Schema Report on the AUTHID. It is possible for a TEST or HISTory status version of an entity-occurrence to be related to the AUTHID (AUTHORIZATION entity-occurrence). To find these entity-occurrences, run a Relationship Report on the AUTHORIZATION entity-occurrence representing the AUTHID in question. Specify a status of ALL.
A DDUTILTY SCHEMA report needs to be run:
//UTLTY EXEC PGM=DDUTILTY,REGION=4M//STEPLIB DD DISP=SHR,DSN=DATACOM.CUSLIB// DD DISP=SHR,DSN=DATACOM.CABDLOAD //SNAPER DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSPUNCH DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD *
-USR userid,pwd-RPT SCHEMA,DEMOEMPL -END/*
In this case it shows there is a view associated with the AUTHID:
0ENTITY-TYPE.... OCCURRENCE....................................................... S VERS *DATACOM/DB * SQLNAME.......................................................... NAME ID USE DESCRIPTION................................... ATZ DEMOEMPL P 00010 VEW DEMOEMPL-EMP_VACATION P 0001 DEMOEMPL.EMP_VACATION0 FLD DEMOEMPL-EMP_VACATION.EMP_ID P 0001 DEMOEMPL.EMP_ID FLD DEMOEMPL-EMP_VACATION.DEPT_ID P 0001 DEMOEMPL.DEPT_ID FLD DEMOEMPL-EMP_VACATION.VAC_TIME P 0001 DEMOEMPL.VAC_TIME
The VIEW needs to be deleted by running DBSQLPR with SYSIN card:
DROP VIEW DEMOEMPL.EMP_VACATION;