Creating a command synonym table on VM and VSE

Use the following procedure to create a command synonym table. Then see Entering command synonym definitions into the table for instructions on entering your synonyms and their definitions.

  1. If necessary, acquire or add a dbspace to hold the command synonym table.
  2. From the QMF SQL query panel, run an SQL CREATE TABLE statement similar to the one in Figure 131 to create the table. Substitute your own table name in place of COMMAND_SYNONYMS and your own table space name for TBSPACE1. Type the other portions of the query exactly as shown.
    Figure 131. Creating a command synonym table
    CREATE TABLE COMMAND_SYNONYMS
      ( VERB               CHAR(18)     NOT NULL,
        OBJECT             VARCHAR(31),
        SYNONYM_DEFINITION VARCHAR(254) NOT NULL,
        REMARKS            VARCHAR(254) )
      IN DBSPACE1
    The VERB and OBJECT columns store your synonym. The SYNONYM_DEFINITION column stores the command or procedure that runs when you enter the synonym.

    The columns can be in any order, and you can add a column for comments so users know what function each synonym performs.

  3. Add comments to the SYSTEMS.SYSCATALOG table using the following example for the COMMAND_SYNONYMS table created with the query in Figure 131.
    COMMENT ON TABLE COMMAND_SYNONYMS IS 'SYNONYMS FOR R AND D'
    The phrase SYNONYMS FOR R AND D appears in the REMARKS column of the SYSTEMS.SYSCATALOG table.
  4. Create an index to maximize performance at initialization time, when QMF processes the command synonym table. Use a statement similar to the following:
    CREATE UNIQUE INDEX SYNONYMS_INDEX
      ON COMMAND_SYNONYMS (VERB, OBJECT)

    Index both the VERB and OBJECT columns with the UNIQUE keyword to prevent duplicate synonym definitions. If you choose not to use the UNIQUE keyword, QMF allows duplicate synonyms in the table; QMF uses the first synonym it locates in the table and displays a warning message on the QMF Home panel after initialization.

[ Previous Page | Next Page | Contents | Index ]