I am using OVRDBF command in my cl program in order to apply a particular select criteria on a database file in order to pass it to the RPGLE code.
The syntax I used is as below:
OVRDBF FILE(MYFILE) TOFILE(MYFILE) +
MBR(MYFILE) OVRSCOPE(*JOB) SHARE(*YES)
OPNQRYF FILE((MYFILE *FIRST *ONLY)) OPTION(*ALL) +
QRYSLT('MYCODE *EQ "R"') OPNID(MYFILE)
Now when I debug my code and execute the above steps successfully, I go to SQL command line in my same session using shift F9 and try to query the same file for other values of MYCODE and they are visible.
Could anyone please help me in achieving my objective of placing the filter on MYFILE with MYCODE = 'R' only so that I can pass it to subsequent functions.
Also help on grouping the fields of MYFILE during OPNQRYF will be appreciated.
May 7, 2012 2:51 PM
May 8, 2012 7:30 PM