An example linear procedure
This example linear procedure selects data, saves the data in a separate table, and prints a report.
- Create and save any objects that the procedure must retrieve
from the database.
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
- On the QMF command
The PROC panel displays.
- Type the QMF commands
that you want this procedure to run in the order you want them to
If you want to display and interact with panels just as you would if you entered a command on the QMF command line, type
INTERACTbefore the command name.
- Add, modify, or delete lines in the procedure:
- Type comment lines if you need them. A comment line is a line that begins with two hyphens (--). These lines are ignored when the procedure runs.
- 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. You can also type INSERT on the QMF command line, move the cursor to the line you want to precede the new line, and press Enter.
- To delete lines from a procedure, move the cursor to the line you want to delete and press the Delete function key. You can also type DELETE on the QMF command line, move the cursor to the line you want to delete, and press Enter.
The following figure shows a procedure that runs the REPT4QRY.
- To save the procedure in the database, enter:
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