Has anyone suggested STRQM and STRQMQRY?
You can pass parameters in the STRQMQRY command.
CHGVAR &LIB2 ('''' *tcat &LIB *tcat '''')
CHGVAR &FIL2 ('''' *tcat &FIL *tcat '''')
OVRPRTF FILE(QPQXPRTF) PAGESIZE(*N 132)
STRQMQRY QMQRY(MSCHUTTE/FLDDEF) +
SETVAR((FILE &FIL2) (LIBRARY &LIB2))
Just a thought.