Masking is a simple, yet powerful feature of the Technology Explorer that can save you time.
The DB2 catalog, and administrative tables and views have many columns that include information in short form.
For example the letter 'V' instead of the word 'View'.
Unless you have these codes memorized, they can be annoying to look up.
Masking replaces the displayed code with text that is easier to read.
The underlying data is not modified so that sorting and searching still work.
There are two types of masks:
- Masks embedded in the XML definition. These are useful for small sets of codes that do not appear in other pages.
- Masks stored in a separate reusable file. These are useful for large sets of codes that are used in multiple pages.
In this example, we will reuse an existing mask file and create embedded masks.
For the Dependencies page the codes that need to be masked are the table type symbols.
The masks used to replace the table type symbols are common throughout the catalog.
Since they are already used elsewhere you can simply reuse the existing mask file located here:
/var/www/tableDefinitions/masks/tableTypeMasks.xml
Goal:
Add a column mask to make the data easier to read.
Steps to complete:
- If you closed the tablecat.xml file
- Open the file '/var/www/tableDefinitions/tableDependCat' from gedit or open a terminal and run the following command:
- “gedit /var/www/tableDefinitions/tableDependCat.xml &”
- Make the changes to your document as indicated on the right
- Save the file
- Do not close the file
The changes are indicated with the following:
- Indicated text has been removed
- Indicated text has been edited
- Indicated text has been added
- Indicated text is the source of a copy