Create Procedure
Occasionally you may need to produce a report on a regular basis using a series of QMF commands. You could execute these steps together as one task by creating a procedure. A procedure, or PROC, allows users to execute a set of QMF commands by entering a single RUN command. An advantage of a procedure is that it reduces the amount of typing required, saving considerable time.
Create a Proc -
Scenario: - Create a new proc to execute a query and use the form to format the report.
- Saved Query - Q_EMPINFO_DETAILS
- Saved form - F_EMPINFO_FORM
STEP-1: - Press PF10 or type SHOW PROC to open the PROC Editor from QMF Main menu screen.

STEP-2: - Once the PROC editor screen appears, Press the HOME key to advance your cursor to the first query input position.
STEP-3: - Enter the desired SQL statements in the empty area between PROC and *** END ***.

STEP-4: - Press TAB to toggle your cursor between the "Command" prompt and the top of the panel.
STEP-5: - When you have finished entering the query, Execute it by Pressing PF2.
STEP-6: - Results appear in a tabular format:

STEP-7: - Press PF3 = Exit (Go back to QMF menu) to navigate back to QMF Main Menu. Press PF10 = Query to go back to PROC editor.