This example shows how to select records in a range of values using the Open Query File (OPNQRYF) command.
OVRDBF FILE(FILEA) SHARE(*YES) OPNQRYF FILE(FILEA) QRYSLT('DATE *EQ %RANGE("88.01.01" + "88.12.31") ') CALL PGM(PGMC) CLOF OPNID(FILEA) DLTOVR FILE(FILEA)
QRYSLT('DATE *EQ %RANGE("' *CAT &LORNG *CAT '"' *BCAT '"' + *CAT &HIRNG *CAT '")')
QRYSLT('DATE *EQ %RANGE(' *CAT &LORNG *BCAT &HIRNG *CAT ')')