Running SQL query for ENF event data. Where is the info on the actual USER causing the event?
search cancel

Running SQL query for ENF event data. Where is the info on the actual USER causing the event?

book

Article ID: 49411

calendar_today

Updated On:

Products

COMMON SERVICES FOR Z/OS 90S SERVICES COMMON PRODUCT SERVICES COMPONENT Common Services

Issue/Introduction

 

In the previous version of ENF (ie. r1.0), before Datacom/AD was used for the database, the CAS9DB QUERY utility was used to obtain information relating to a specific event. One useful piece of information was USER. Where USER was the user belonging to the JOBNAME causing the event.

Starting with ENF r12, when Datacom/AD started to be utilized as the database of choice, running an SQL job (PGM=DBSQLPR) with USER as one of the SELECT criteria, the user belonging to the JOBNAME is not returned. Instead the ENF AUTHID CAS9ENFS is returned.

Example:

//SQL EXEC PGM=DBSQLPR,REGION=0M,PARM='AUTHID=CAS9ENFS'
SELECT DSN,DATE,TIME,JOBNAME,USER
FROM CAS9ENFS.DSCLOSE;

 

Resolution

 

When coding the SELECT statement enclose USER in double quotes as follows:

//SQL EXEC PGM=DBSQLPR,REGION=0M,PARM='AUTHID=CAS9ENFS'
SELECT DSN,DATE,TIME,JOBNAME,"USER"
FROM CAS9ENFS.DSCLOSE;