|
You would also need to do this in STRQMQRY SETVARs is you used the command from a command line or in a menu. It is, admittedly, a bit funkier in this command. Tom Liotta's solution is, IMO, inspired. I don't remember seeing it in IBM's documentation.
The point with STRQMQRY is, you are building a character string - the SQL statement. That is why you must use only *CHAR CL variables in the SETVAR parameter. All this is documented in the Query Management Programming manual, in an appendix, IIRC.
So I personally would not blame CL for your difficulties - it is a part of the whole system.
JMNSHO Vern At 05:02 PM 8/17/2005, you wrote:
Must treat them as a literal SQL0404-Value for column or variable OUTQ too long. Every time I violate my self imposed mantra to not program anything with CL I get reminded - the hard way. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Walden H. Leverich" <WaldenL@xxxxxxxxxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 08/17/2005 04:42 PM Please respond to Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> To "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx> cc Subject RE: Can CL write to a disk file Rob, What happens if you put single quotes in the QMQRY file? That is: INSERT INTO OUTQFIX VALUES('&OUTQFIX_OUTQ', '&OUTQFIX_AUTHLIST', '&OUTQFIX_CHANGED', '&OUTQFIX_MSGID') Does it then treat the &xxx as a literal, or does it still replace them? -Walden ------------ Walden H Leverich III Tech Software (516) 627-3800 x11 WaldenL@xxxxxxxxxxxxxxx http://www.TechSoftInc.com Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.) -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Wednesday, August 17, 2005 5:38 PM To: midrange-l@xxxxxxxxxxxx Subject: Can CL write to a disk file Is there a command like SNDF that will work to a disk file? V5R3. Trying workarounds like CHGVAR VAR(&OUTQFIX_OUTQ) VALUE('A') CHGVAR VAR(&OUTQFIX_AUTHLIST) VALUE('A') CHGVAR VAR(&OUTQFIX_CHANGED) VALUE('A') CHGVAR VAR(&OUTQFIX_MSGID) VALUE('A') STRQMQRY QMQRY(OUTQFIX) + SETVAR((OUTQFIX_OUTQ &OUTQFIX_OUTQ) + (OUTQFIX_AUTHLIST &OUTQFIX_AUTHLIST) + (OUTQFIX_CHANGED &OUTQFIX_CHANGED) + (OUTQFIX_MSGID &OUTQFIX_MSGID)) Which executes INSERT INTO OUTQFIX VALUES(&OUTQFIX_OUTQ, &OUTQFIX_AUTHLIST, &OUTQFIX_CHANGED, &OUTQFIX_MSGID) But I get stupid messages like: CALL ROB/TESTFIX 215 - STRQMQRY QMQRY(OUTQFIX) SETVAR((OUTQFIX_OUTQ 'A') (OUTQFIX_AUTHLIST 'A') (OUTQFIX_CHANGED 'A') (OUTQFIX_MSGID 'A')) Column A not in specified tables. RUN QUERY command failed with SQLCODE -206. And I'm just plain disgusted playing the apostrophe game. Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.