Previous Topic: Examples of Ad-Hoc SQL QueriesNext Topic: List Users Connected to a Role


List Roles Connected to a Userid

This SQL query is the foundation of the CAS4CR01 report. This query returns all of the roles that are connected to a specific userid on a specific system image.

The ROLEXREF table contains the cross-reference information matching a role with each userid connected to the role.

To list roles connected to a userid, execute the following SQL commands:

SELECT *                    
FROM   CIADB01.ROLEXREF     
WHERE USERID = 'TESTU01' AND
      SYSID= 'SY59';

A report with the roles connected to a userid is created.