Entering commands

You can issue QMF commands in several ways: on the command line, with a function key, on a prompt panel, or from a procedure or application.

If your site defined a command synonym with the same name as a QMF command, you must precede the command with QMF to override the synonym.

On the command line

Where a command line appears, you can enter any QMF command by typing it in full after the arrow. For example:
To run the command, press Enter.

With a function key

You can enter some commands by using function keys. QMF has a default set of function keys for each panel. The function keys that you see when you use QMF can differ from the defaults if your administrator customized them. This information refers to the default set of function keys.

To use parameters with a function key command, type the parameters on the command line, then press the function key. For example, when the query panel is displayed, type (FORM=FORM2, then press the Run function key. The following command is run:

On a prompt panel

QMF displays a command prompt panel if you enter a command with a syntactical error (or a misspelling twice in succession), or when you enter the command name followed by a question mark on the command line. This prompt panel is useful when you enter long commands.

For example, when you enter RUN ?, the command prompt panel that is shown in the following figure is displayed, on which you can enter the required information:
Figure 1. RUN Command Prompt panel
                         RUN Command Prompt
                                                                        1 to 8 of 8
 Type (                        )
 Name (<------------------------------------------------->)+
 .... (<------------------------------------------------->)+
 .... (<------------------------------------------------->)+
 .... (<------------------------------------------------->)+
 .... (<------------------------------------------------->)+
 .... (<------------------------------------------------->)+
      To run an object from temporary storage, enter its type:
      QUERY or PROC.
      To run an object from the database, enter its name (and
      optionally its type). Type can be QUERY or PROC.

 F1=Help   F3=End   F4=List   F7=Backward   F8=Forward

If the command references an object name and the object name is too long to fit on one line, continue typing the name on the next line. The name does not need to be delimited by quotation marks when continued on multiple lines on the panel.

Entries in the Name field that begin with the characters ALL must be delimited in double quotation marks. For example, if you want to list all objects whose names begin with ALL, type "ALL%" in the Name field and press the List key.

If QMF needs more information to complete a command, a second panel might be displayed to prompt you for command parameters.

You can skip the first panel of this two-step prompt by entering the command, the object type, and the object name, followed by a question mark on the command line. A panel appears containing the parameters that are applicable to that object.

A question mark is not valid in the parameters portion of a command (after the left parenthesis). Also, any parameters that follow the question mark are ignored. For example, (FORM=FORM2 is ignored in the following command:

The following function keys appear on most prompt panels:

Displays help information about the displayed message.
Displays a list of objects from which you can select.
Returns to the panel from which the prompt was issued.

From a procedure

You can include most QMF commands as a line in a procedure, including a RUN command that runs another procedure. This feature is helpful when you use commands that are too long to enter on the command line.

When you put commands into a procedure, use the full command names, parameters, and values rather than the abbreviations. The minimum acceptable abbreviation for an existing word might change in future releases and cause your procedure to fail.

When you use QMF commands in a procedure with logic, the commands:
  • Must be in uppercase, regardless of the profile setting
  • Can be continued by ending the line with a comma
  • Can contain substitution variables

Commands in linear procedures can be continued over more than one line by placing a plus sign (+) as a continuation character in column 1 of each additional line. The continued line then starts in column 2.

An object name, authorization ID, or location must be within double quotation marks (delimited identifiers) when continued over more than one line, as shown in the following figure:

Figure 2. Continuing a qualified object name over more than one line in a linear procedure


Use single quotation marks when you use the LIST command.

From an application

You can enter QMF commands from within applications that use the following interfaces. QMF commands within applications must be entered in uppercase, regardless of how the CASE option of the QMF profile is set.

Command interface
Receives QMF commands from ISPF. QMF must be started before the application or CLIST is run. The command interface is not available in CICS®, as its function depends on ISPF.
Callable interface
Receives QMF commands directly from the QMF common programming interface (CPI). You can start and stop QMF from your application. ISPF is not required.