Creating synonyms for selected tables by importing DML
Use the following procedure to import DML to create a task ID that creates synonyms for selected tables and derives synonym names from the literal SYN_.
To create synonyms for selected tables
In an ISPF editor, type the DML statement to match the one shown in the following figure and provide the information that is unique to your site.For information about DML syntax, see CM-PILOT-Data-Manipulation-Language-DML.
LIKE SYNONYM
JOIN SYSIBM.SYSTABLES
SET
NAME = 'SYN_'
CONCAT SUBSTR(SYSIBM.SYSTABLES,NAME,1,12),
CREATOR = 'NEWSYN',
TBCREATOR = SYSIBM.SYSTABLES.CREATOR,
TBNAME = SYSIBM.SYSTABLES.NAME
WHERE
SYNONYMS.CREATOR = 'RDACRJ' AND
SYNONYMS.NAME = 'SY_T_PRODUCT01' AND
LENGTH(SYSIBM.SYSTABLES.NAME) <= 12 AND
SYSIBM.SYSTABLES.CREATOR = 'ALUQA'
;In the preceding figure, the DML has been edited to join to the SYSIBM.SYSTABLES. The SET clause uses the SUBSTR function to use only the first 12 characters of the TABLE name. The WHERE clause has a LENGTH specification. The LENGTH check ensures that only tables whose names have an additional four characters added to the beginning of the name for the synonym are utilized.
- Import the DML file.Now that the DML file has been imported, you can analyze a work ID and execute a worklist.