|
Hi RobI remember doing this a long way back and my recollection is that sending character values to QMQRY required an extra set of apostrophes (go figure). I finally figured this out at the time because even sending numeric values required one set of apostrophes; I therefore concluded it must be stripping off a set of apostrophes when parsing the values. This led to the even more ludicrous solution that I now needed three (or was it four ?) apostrophes to allow for providing two quotes to signify a single (real) quote. Sounds absurd but I think you will get what I mean.
The safest methodology I found (not unlike OPNQRYF) was to create a field called "E and double up on it where necessary when building the string. I seem to recall seeing similar solutions here. I also like the approach (also seen here) where the query string is built as a string separately rathern than having all the *CATS *BCATS etc in the actual command string. Easier to debug.
My preference when wanting to write vales to a file from CL is usually to write an RPG input program and front end it with a command. Much cleaner IMHO.
Regards Evan Harris At 09:37 a.m. 18/08/2005, you wrote:
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
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.