|
Date: Tue, 15 Jul 2014 10:51:26 -0500
From: vhamberg@xxxxxxxxxxxxxxx
To: midrange-l@xxxxxxxxxxxx
Subject: Re: QMQRY issue
This is an excellent place to mention a technique someone showed us in
these lists - maybe Buck, maybe Tom Liotta.
Anyhow, if you want an apostrophe (single quote) then put in a
substitution variable such as &QT.
In your SELECT you would have A.TRFIDT <= &QT&NXTSAT&QT
In your SETVAR, have one that is SETVAR((QT '''') (NXTSAT &NXTSAT6A))
That assumes that TRFIDT is alpha.
HTH
Vern
On 7/15/2014 10:05 AM, Carel Teijgeler wrote:
Dan,
The value has to be in double quotes, like '''147019'''.
The outer quotes make it a character variable, the inner quotes are
passed with the value into the QMQRY query.
The actual value pass is ''147019''
Regards,
Carel Teijgeler
On 15-7-2014 16:34, Dan Rasch wrote:
I am attempting to pass a value to a QMQRY.
The query looks like this:
INSERT INTO IS2LIB/TEMPROB1(SELECT A.TRFBCH, A.TRFSTS, A.TRFTYP,
A.TRFFLC, A.TRFTLC, A.TRFIDT, A.TRFINS, A.TRFREF, B.INUMBR,
B.TRFREQ, B.TRFSHP, B.TRFREC, B.TRFALC FROM MM4R6LIB/TRFHDR A,
MM4R6LIB/TRFDTL B WHERE A.TRFBCH = B.TRFBCH AND B.TRFSTS = 'A'
AND A.TRFFLC IN(902, 904, 970, 971) AND A.TRFIDT >= 060601 AND
A.TRFIDT <= &NXTSAT AND A.TRFTLC <> 66 AND A.TRFTLC <> 68
ORDER BY A.TRFFLC, A.TRFTLC)
The CL program:
DCL VAR(&NXTSAT6A) TYPE(*CHAR) LEN(6) VALUE('140719')
STRQMQRY DANRLIB/WOTRT01 SETVAR(NXTSAT &NXTSAT6A)
MM4R6LIB/TRFHDR field: TRFIDT ZONED 6 0
The error I get is:
140719 is not a valid Query Management variable.
Suggestions?
TIA,
Dan
--
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.