+ Reply to Thread
Results 1 to 2 of 2

Thread: OPNQRYF CPF9899 message

  1. #1

    Default OPNQRYF CPF9899 message

    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' + || &QUOTE || &SYSDTE || &QUOTE) So get rid of the &QUOTE'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.

  2. #2

    Default OPNQRYF CPF9899 message

    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(&QUOTE) TYPE(*CHAR) LEN(1) VALUE('"') /**** Setup query select variable field *****/ CHGVAR VAR(&QRYSLT) + VALUE('CCSAL *EQ ' |> &QUOTE |< &REP |< + &QUOTE |> '*AND CCCMP *EQ' |> &QUOTE + |< &CMP |< &QUOTE |> '*AND CCLSD *EQ' + || &QUOTE || &SYSDTE || &QUOTE) /**** 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" ' ' ' ' ' &QUOTE *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

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 10-17-2005, 02:00 AM
  2. Replies: 2
    Last Post: 11-01-2004, 01:24 PM
  3. OPNQRYF CPF9899 message
    By J.Pluta in forum Programming
    Replies: 3
    Last Post: 07-11-2001, 01:59 PM
  4. Print message going to wrong message queue!
    By Guest.Visitor in forum Application Software
    Replies: 1
    Last Post: 07-02-2001, 06:53 AM
  5. Dropping a message on a message queue from Windows NT
    By Guest.Visitor in forum IBM i (OS/400, i5/OS)
    Replies: 2
    Last Post: 03-15-2001, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts