|
Hi, I am attempting to create a command that will execute a query management query and I am becoming quite frustrated. I am attempting to follow the example in the Query Manager Reference book on the web but am obviously missing something because I can't get it to work. Any suggestions would be greatly appreciated. Here are the details: This is my SQL object called P668 select A.div,A.acct,A.year, A.code, A.month , A.amount, A.descr, A.jrnl from actback A where A.prg = &COND1 ORDER BY A.CODE I created a report form called P668 as well. Inside of query manager, I am prompted for a value and I type in '668 ' because field A.prg is a 5 character field. Everything works fine so I don't think there's anything wrong with the sql. Then I created a CL program called PRGCHRGS: PGM PARM(&PROG) DCL VAR(&PROG) TYPE(*CHAR) LEN(5) STRQMQRY QMQRY(P668) OUTPUT(*PRINT) QMFORM(P668) + SETVAR((COND1 &PROG)) ENDPGM ...and I created a CMD source called PRGCHRGS: CMD PROMPT('LISTING OF CHARGES FOR PROGRAM') PARM KWD(PROG) TYPE(*CHAR) LEN(5) RTNVAL(*NO) + PROMPT('ENTER PROGRAM NUMBER') When I type PRGCHRGS and prompt it, I get my prompt ok. But when I type in 668, whether in quotes or not (I've tried it both ways), I get the following: PRGCHRGS PROG(668) Comparison operator = operands not compatible. RUN QUERY command failed with SQLCODE -401. RUN QUERY command ended due to error. STRQMQRY command failed. Function check. QWM2701 unmonitored by PRGCHRGS at statement 300, instruction X'000F'. QWM2701 received by PRGCHRGS at 300. (C D I R) QWM2701 received by PRGCHRGS at 300. (C D I R) It's like the system is not recognizing that 668 is a character field even though I have defined it as such. We are running v3r7. Sorry for such a long post but I wanted to provide as much information as possible. Any ideas?? Thanks in advance, Chris Gonzalez +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.