Help400.de    

QM Query

Informations around iSeries/400 Home   EMail  Disclaimer

 

Creating a Query Manager Query from a Query Definition:

RTVQMQRY   QMQRY(lib/qrydfn) SRCFILE(lib/QQMQRYSRC) ALWQRYD(*YES)

This will create a source member with the same name as the original query in the
QQMQRYSRC file in the library specified.

Use SEU to modify the Query Manager source.  Change the dates from their hard-coded values to &FDATE and &TDATE in order to use the values in the dates files in the MIS Query libraries.

CRTQMQRY    QMQRY(lib/qmqry) SRCFILE(lib/QQMQRYSRC) SRCMBR(qmqry)

Use STRQMQRY command to run the new query.  If using variables to fill in the date values, then the SETVAR parameter must be include
STRQMQRY    QMQRY(lib/qmqry) OUTPUT(*OUTFILE)  +
OUTFILE(lib/file) SETVAR((FDATE &FDATE) (TDATE &TDATE))

See the WKDATES file for the definition of the possible date variables.  In the STRQMQRY command the "&" variable is the one from the dates file, and the field of the same name without the ampersand is the variable defined in the QM Query using an "&".

 It is not necessary to use the WKDATES file to retrieve the date information used by a QM Query.  Any CL prompt or other programming source may be used to create and pass the variable values to the STRQMQRY command.

 

 


Sinfonia Kreuzfahrt