MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » June 2008

OPNQRYF QRYSLT CPF9899 Al Mac



fixed

My OPNQRYF statement is failing on CPF9899
"Missing Operator in Expression in QRYSLT parameter"

I am hoping that it jumps out to someone knowlegeable with this stuff, where MEKLUTZ has el typo, overlooked something obvious, or something missing from the syntax.

I don't use Open Query File often enough to be skilled at it.
I am on V5R1.

I copied this code from another CL that works, then I changed name of file, names of parameters, fields, tests, etc. to what was wanted, and in the process, probably missed some nuances with syntax. Key fields are transcribed from RARL94 DDS.

OVRDBF FILE(RARL94) SHARE(*YES)

CHGVAR VAR(&RI) VALUE('RI') /* Al not yet know +
other than RANGE lingo */

/* stuff in string of concatentations needs to be alpha format */
/* so change date from numeric YYYYMMDD to alpha equivalent */

CHGVAR VAR(&DATE1) VALUE(&P1DAT1)
CHGVAR VAR(&DATE2) VALUE(&P2DAT2)

/* we use 1st 3 characters for profit center */
/* but actual field in BPCS is 10 characters */

CHGVAR VAR(&SEVEN) VALUE(' ') /* 7 spaces */
CHGVAR VAR(&PRF1) VALUE(&P3PRF1 *CAT &SEVEN)

CHGVAR VAR(&SEVEN) VALUE('9999999') /* 7 nines */
CHGVAR VAR(&PRF2) VALUE(&P4PRF2 *CAT &SEVEN)

CHGVAR VAR(&SELECT) VALUE('RDATE = %RANGE(' *CAT +
&DATE1 *BCAT &DATE2 *CAT ')')

CHGVAR VAR(&SELECT) VALUE(&SELECT *BCAT '*AND RPRF +
= %RANGE(' *CAT &PRF1 *BCAT &PRF2 *CAT ')')

CHGVAR VAR(&SELECT) VALUE(&SELECT *BCAT '*AND RRID +
= %RANGE(' *CAT &RI *BCAT &RI *CAT ')')

OPNQRYF FILE((RARL94)) QRYSLT(&SELECT) +
KEYFLD((RDATE) (RCOMP) (RPRF) (RCUST) +
(ARODPX) (RINVC) (ARODTP) (ARODYR))
-
Al Macintyre







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact