View Full Version : OPNQRYF CPF9899 message
T.Holt
06-12-2001, 08:33 AM
If CCLSD is numeric, you don't need quotation marks around the literal to which it's compared. CHGVAR VAR(&QRYSLT) + VALUE( ... '*AND CCLSD *EQ' + || "E || &SYSDTE || "E) So get rid of the "E's. It should be '*AND CCLSD *EQ |> &SYSDATE' I don't know if that's the whole problem or not. It's the only thing I see that looks funny.
ejolro
06-12-2001, 08:35 AM
I'm trying to query a file and keep getting an error message. It started happening after I added CCLSD to the query. CCLSD is a 7 position numeric field. DCL VAR(&REP) TYPE(*CHAR) LEN(5) DCL VAR(&CMP) TYPE(*CHAR) LEN(3) VALUE('AM ') DCL VAR(&SYSDTE) TYPE(*CHAR) LEN(7) DCL VAR(&QRYSLT) TYPE(*CHAR) LEN(1000) DCL VAR("E) TYPE(*CHAR) LEN(1) VALUE('"') /**** Setup query select variable field *****/ CHGVAR VAR(&QRYSLT) + VALUE('CCSAL *EQ ' |> "E |< &REP |< + "E |> '*AND CCCMP *EQ' |> "E + |< &CMP |< "E |> '*AND CCLSD *EQ' + || "E || &SYSDTE || "E) /**** Override CUSCMP *****/ OVRDBF FILE(CUSCMP) SHARE(*YES) /***** Query for new sales rep and company *****/ OPNQRYF FILE((SLSREPTEST/CUSCMP)) OPTION(*ALL) + KEYFLD((CCCMP) (CCCUS) (CCJST)) + QRYSLT(&QRYSLT) Here's whats in the &QRYSLT field. 'CCSAL *EQ " 66" *AND CCCMP *EQ "AM" *AND CCLSD *' 'EQ" 061201" ' ' ' ' ' Here's the error message. Message . . . . : CPF9899 received by NEWREPCL at 6908. (C D I R) Cause . . . . . : Control language (CL) program NEWREPCL in library SLSREPTEST detected an error at statement number 6908. Message text for CPF9899 is: Error occurred during processing of command. Recovery . . . : This inquiry message can be avoided by changing the program. Monitor for the error (MONMSG command) and perform error recovery within the program. To continue, choose a reply value. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables and cancel the CL program. I -- Ignore the failing command. R -- Try the failing command again. Here's the values of the fields in the dump.Function check. Function check. CPF9899 QMHUNMSG unmonitored by NEWREPC L at statement 6908, in struction X'0059'. Variables Value *...+....1....+....2....+ 'AM ' 'CCSAL *EQ " 66" *AND CC' 'CMP *EQ "AM" *AND CCLSD *' 'EQ" 061201" ' ' ' ' ' "E *CHAR 1 '"' &REP *CHAR 5 ' 66' &SYSDTE *CHAR 7 ' 061201' Does anyone know what's causing the error message. I've tried everything I can think of so any help would be appreciated. Erik Osberg
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.