Friday, June 5, 2009

(FAQ) Using OPNQRYF %WLDCRD

OPNQRYF %WLDCRD - same functionality with that of SQL LIKE keyword.
See sample code below:

Example:

PGM

OVRDBF FILE(PF001A) SHARE(*YES)

OPNQRYF FILE((PF001A)) +

QRYSLT('(PFRMKS=%WLDCRD("*Expired*"))') +

KEYFLD(*FILE)

CPYFRMQRYF FROMOPNID(PF001A) TOFILE(QTEMP/PF001A) +

MBROPT(*REPLACE) CRTFILE(*YES)

CLOF OPNID(PF001A)

DLTOVR FILE(*ALL)

No comments:

Post a Comment