How can I see the column masks being used by a table?

Document ID : KB000032047
Last Modified Date : 14/02/2018
Show Technical Document Details

R19 release of CA RC/Query for DB2 for z/OS has new reports for Row Permission and Column Masks for a table. The report names are T-PM (Table Permissions
and Masks), PM-D(Permission and Mask Details) & PM-L(Permission & Mask List).


Here is a sample of the Table(T), Permission and Mask(PM) report.

  DB2 Object ===> T                       Option  ===> PM   Where => N

  Table Name ===> *                     > Creator ===> authid                 >

    PM Owner ===> *                     > N/A     ===> *                      >

 Loc: LOCAL ---------- SSID: ssid ----------AUTHID  -          LINE 1 OF 2    >

 CMD      TBNAME              TBSCHEMA  PM NAME             PM OWNER

 ________ COLMASK             authid

 DDL_____                               COLMASK             authid




A DDL line command on the mask(2nd line above) produces:

 SET CURRENT SQLID = 'authid';

 

 

CREATE MASK authid.COLMASK

        ON authid.COLMASK

        FOR COLUMN COL2_INTEGER RETURN

CASE WHEN (COL1_SMALLINT = 1) THEN 9999 ELSE COL2_INTEGER END

ENABLE;




A PM/D report also shows the details of the mask:

  DB2 Object ===> PM                      Option  ===> D    Where => N

     PM Name ===> *                     > Schema  ===> authid                >

    PM Owner ===> *                     > N/A     ===> *                      >

 Loc: LOCAL ---------- SSID: ssid ----------authid -         FRAME 1 OF 1

 ********************************* TOP OF DATA ********************************

 CMD: ________

      NAME : COLMASK

 

    SCHEMA : authid                     OWNER TYPE: AUTHID

     OWNER : authid

 

    TBNAME : COLMASK

   TBSCHEMA: authid

 TB CORREL :

 RULE TYPE : COLUMN MASK                  COL NAME : COL2_INTEGER

  ENFORCED : A                            IMPLICIT : N

   ENABLE  : Y         STATUS  :         RELCREATED: DB2v10

  CREATEDTS: 2015-10-07-03.09.20.514203   ALTEREDTS: 0001-01-01-00.00.00.000000

 RULE TEXT : CASE WHEN (COL1_SMALLINT = 1) THEN 9999 ELSE COL2_INTEGER END