Creating a command synonym

To create a command synonym:

  1. Create a descriptive command.

    QMF commands follow the verb object format. Every command is a verb (action word) and many commands also have an object (descriptive noun) following them. For example, END is a verb-only command, while CONVERT QUERY is a verb-object command.

    You can create command synonymswith verbs that are identical to existing QMF commands. If you do, you can still use the original QMF command by preceding it with the command QMF. See QMF Reference for information on the command QMF.

    For example, suppose your procedure runs a report to see if the weekly sales figures have been entered. If the data for the current week is missing, the procedure calls the Table Editor to add the latest information to the table. Regardless of what you named the procedure, you want the command synonym to be descriptive for the user. You could choose a verb-object pair like UPDATE SALES.

    If your command synonym needs parameters or options, you can use the substitution variable &ALL.

  2. Update the appropriate command synonym table with your new command synonym.

    You need to know the name of the command synonym table you want to use. The variable DSQAP_SYNONYM_TBL contains the name of the command synonym table for each user.

    Your database administrator has access to the command synonymtables. If you want to create a command synonym for your personal use, you might want to have a view defined that lets you add command synonyms.

    A command synonym table would contain the following information for the command synonym UPDATE SALES:

     ADD                Q.COMMAND_SYNONYMS
     
                                                                       1 to 4 of 4
      VERB. . . . . . . . . ( UPDATE             )
      OBJECT. . . . . . . . ( SALES                           )
      SYNONYM_DEFINITION. . ( RUN PROC WEEKLY_SALES                        >
      REMARKS . . . . . . . ( procedure that checks to see if the weekly sales fi>
     

    After you press the ADD function key, QMF adds this command synonym to your table. Before you can use the command, however, you must reconnect to QMF.

  3. Update your profile, if necessary.

    If you added this command synonym to a new table or view, add the name of the new table or view to your profile.

  4. End your QMF session.

    QMF does not recognize the changes you made to your command synonym and profile tables until you start a new QMF session.

[ Previous Page | Next Page | Contents | Index ]