Retrieve Query Management Form (RTVQMFORM)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Retrieve Query Management Form (RTVQMFORM) command allows you to retrieve encoded form source records from a query management form (QMFORM) object. The source records are placed into a source file member that can be edited.

Form source can also be retrieved from a query definition (QRYDFN) object when the specified QMFORM does not exist.

Top

Parameters

Keyword Description Choices Notes
QMFORM Query management report form Qualified object name Required, Positional 1
Qualifier 1: Query management report form Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCFILE Source file Qualified object name Required, Positional 2
Qualifier 1: Source file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Source member Name, *QMFORM Optional, Positional 3
ALWQRYDFN Allow information from QRYDFN *NO, *YES, *ONLY Optional
Top

Query management report form (QMFORM)

Specifies the query management form object whose source is being retrieved.

This is a required parameter.

Qualifier 1: Query management report form

name
Specify the name of the form being retrieved.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the form. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Source file (SRCFILE)

Specifies the previously-created source physical file into which the encoded form source records are to be written.

This is a required parameter.

Qualifier 1: Source file

name
Specify the name of the source file that is to receive the form source.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
name
Specify the name of the library to be searched.
Top

Source member (SRCMBR)

Specifies the source physical file member into which the encoded form source records are to be written. If a source file member name is not specified, then the form name specified on the QMFORM parameter is used.

If the member existed before running this command, it is cleared before any source statements are written into it. If the member does not exist, it is created.

*QMFORM
The member name is the same as the form name specified on the QMFORM parameter.
name
Specify the name of the member to receive the form source.
Top

Allow information from QRYDFN (ALWQRYDFN)

Specifies whether form information is taken from a QRYDFN object when a query management form (QMFORM) object cannot be found using the specified object name. Any information that has to be derived in this way is discarded when the command has completed processing. No query management object is created.

*NO
Information is not taken from a QRYDFN object.
*YES
Information is taken from a QRYDFN object when the specified QMQRY object is not found.
*ONLY
Information is taken only from a QRYDFN. Query management objects are ignored.
Top

Examples

Example 1: Retrieving Encoded Form Source

RTVQMFORM   QMFORM(RPTLIB/SALFORM)  SRCFILE(FORMS)
            SRCMBR(EMPFORM)

This command retrieves the encoded form source from the form named SALFORM located in the RPTLIB library. The encoded form source records that are retrieved are placed into the newly created or cleared member EMPFORM in the first file named FORMS in the user's library list.

Example 2: Retrieving Source From Either the QMFORM or the QRYDFN

RTVQMFORM   QMFORM(RPTLIB/SALFORM)  SRCFILE(FORMS)
            SRCMBR(EMPFORM)  ALWQRYDFN(*YES)

This command retrieves the encoded form source from the query management form (QMFORM) named SALFORM located in the RPTLIB library. If there is no QMFORM object named SALFORM in the RPTLIB library, then the form source is retrieved from the query definition (QRYDFN) named SALFORM in the RPTLIB library. The encoded form source records that are retrieved are placed into the first file named FORMS in the user's library list.

Top

Error messages

*ESCAPE Messages

QWM2701
&1 command failed.
QWM2703
&1 command ended.
QWM2705
Source file &1 in &2 not available.
Top