Probier mal so:

OPNQRYF FILE((DIW7PF)) QRYSLT('IWIDDT *EQ ' *CAT &PDATV) ...

Siehe hier unter Example 1, Notes 5.
Selecting records using the Open Query File (OPNQRYF) command