Creating a column mask for a column in a table
Use the following procedure to create a mask for a column.
- On the BMC AMI Change Manager for Db2 Main Menu, select WORKID, and press Enter.
- On the WORKID Action Menu, type the name of the existing WORKID or type a wildcard pattern to display a list of work IDs. Then, select Specify Db2 definitions and press Enter.
- On the Object Specification panel, specify the name of a database and table (or use wildcard characters). Then, press Enter.
- On the Mixed List panel, type CMK in the Act column adjacent to the table (TB) on which you want to add a column mask.
- On the Create Column Mask panel, specify the information about the mask.
- Type the schema of the mask.
- Type the name of the mask.
- Type the name of the column for the mask. Alternatively, you can select the column by typing ? in the field or by using the Table Column List option.
- (optional) In the Cor Name field, type the correlation name for the table.
- (optional) In the Enable field, type Y to activate the permission.
- On the Create Column Mask panel, type S to select the Column Mask Text panel and one or more of the following panels:
- Schema Path
- Comments
- Press Enter to proceed to the next panel.
Enter the case expression for the column mask in the editor as shown in the following figure.
****** ***************************** Top of Data ******************************
====== CREATE MASK <schema>.<maskName>
====== ON <tableOwner>.<tableName>
====== FOR COLUMN <columnName>
====== RETURN
000001 CASE WHEN
000002 THEN
000003 ELSE
000004 END
====== DISABLE
****** **************************** Bottom of Data ****************************- Press END to proceed to the next panel or return to the Create Column Mask panel.
- Press END.
The Mixed List panel is displayed, as shown in the following figure.
DEJM ALTER --------------------------- Mixed List ---------------------------
Command ===> Scroll. . PAGE
WORKID . . . . : MVSSXS1.SCB0522A Commands: CANCEL
Type action next to object and press Enter.
E=Edit L=Like D=Drop U=Undo
Objects 1 to 13 of 13
More:
Act Object-Type Objects
************************************ TOP **************************************
DB . . . . . . S1BASIC
TB . . . . . S1BASIC T_T10AIM
TB . . . . . S1BASIC T_T01AICP
*L MK . . . . S1BASIC MK_T01AICP
TB . . . . . S1BASIC T02ASSEG
TB . . . . . S1BASIC T_T03AMSEG_A
TB . . . . . S1BASIC T_T03AMSEG_B
TBT. . . . . S1BASIC T_T04ATCP
TBT. . . . . S1BASIC T_T05APBR
TB . . . . . S1BASIC T_T06APBG
TB . . . . . S1BASIC T_T07APBG
TBT. . . . . S1BASIC T_T08APBR
TBT. . . . . S1BASIC T_T15APBR
*********************************** BOTTOM ************************************
The new column mask, designated by the MK object type, is displayed below the table object.
- Press END until the WORKID Action Menu is displayed.Now that a column mask has been created, you can analyze the work ID and execute the worklist.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*