× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Firstly, I recommend that whenever you use OPNQRYF with variables that
you display that variables with the command:

SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) +
MSGDTA(&SELECT) MSGTYPE(*INFO)

Or if the &SELECT is longer that 512 characters, break it up as follows:

SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) +
MSGDTA(%SST(&SELECT 1 512)) MSGTYPE(*INFO)


Secondly, it looks like the field RRID is a character field. In which
case, the variables in the %range have to be surrounded by double quotes
ie. %range("value1" "value2").

\Vincent


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Al Mac Wheel
Sent: Thursday, June 05, 2008 11:30 AM
To: Midrange-L
Subject: OPNQRYF QRYSLT CPF9899 Al Mac

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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.