Using QMF


Creating a linear procedure

For this example, you create a linear procedure to do the following:

To create a linear procedure:

  1. Create and save the query and form.

    In this example, REPT4QRY is the name of the saved query, and REPT4FORM is the name of the saved form. Here is the query for this example:

    SELECT NAME, ID, COMM
    FROM Q.STAFF
    
  2. On the QMF command line, enter:
    RESET PROC
    

    The PROC panel displays.

  3. Type the QMF commands you want this procedure to run in the order you want them to run.

    If you want to display and interact with panels just as you would if you entered a command on the QMF command, type INTERACT before the command name.

    For more information on the INTERACT command, see the QMF Reference, SC26-4716-05.

  4. Type comment lines if you need them.
  5. To insert lines in a procedure, move the cursor to the line you want to precede the new line, and press the Insert function key.

    Or you can type INSERT on the QMF command line, move the cursor to the line you want to precede the new line, and press Enter.

  6. To delete lines from a procedure, move the cursor to the line you want to delete and press the Delete function key.

    Or you can type DELETE on the QMF command line, move the cursor to the line you want to delete, and press Enter.

    Figure 147. Enter your procedure on the PROC panel.

    +--------------------------------------------------------------------------------+
    | PROC                                    MODIFIED    LINE 1                     |
    |                                                                                |
    | -- MONDAY MORNING REPORT.                                                      |
    | -- PROCEDURES MAY CONTAIN COMMENT LINES; THEY BEGIN                            |
    | -- WITH TWO HYPHENS.                                                           |
    | -- A TITLE OR IDENTIFIER AT THE BEGINNING IS USEFUL.                           |
    |                                                                                |
    | RUN QUERY REPT4QRY (FORM=REPT4FORM                                             |
    | -- THIS COMMAND RUNS YOUR QUERY AND FORMATS THE REPORT.                        |
    |                                                                                |
    | SAVE DATA AS LASTWEEKDATA (CONFIRM=NO                                          |
    | -- THIS COMMAND SAVES YOUR DATA AND OVERRIDES THE VALUE OF                     |
    | -- CONFIRM IN YOUR PROFILE FOR THE DURATION OF THE COMMAND.                    |
    |                                                                                |
    | PRINT REPORT (LENGTH=50                                                        |
    | -- THIS COMMAND PRINTS THE REPORT.                                             |
    | -- YOU MAY OR MAY NOT WANT TO CHANGE PRINTING                                  |
    | -- SPECIFICATIONS BY USING OPTIONS OF THE PRINT COMMAND.                       |
    | MESSAGE (TEXT 'OK, LASTWEEKDATA HAS BEEN SAVED AND PRINTED.'                   |
    | --THE MESSAGE COMMAND CAN BE USED TO DISPLAY A MESSAGE WHEN THE                |
    | --PROCEDURE HAS FINISHED.                                                      |
    |                                                                                |
    |                                                                                |
    | *** END ***                                                                    |
    | 1=Help       2=Run        3=End      4=Print     5=Chart        6=Query        |
    | 7=Backward   8=Forward    9=Form     10=Insert   11=Delete       12=Report     |
    | OK, cursor positioned.                                                         |
    | COMMAND ===>                                   SCROLL ===> PAGE                |
    +--------------------------------------------------------------------------------+
  7. To save the procedure in the database, enter:
    SAVE
    

    QMF prompts you for the name you want to assign to the procedure.

    You can also enter:

    SAVE AS procname
    

    For this example, enter:

    SAVE AS MONDAY
    


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]