On 7/15/2014 10:34 AM, 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.

SETVAR() is a list of lists. Here is an example:
SETVAR((COL1 'val1') (COL2 'val2') (COL3 'val3'))

Each 'entry' is a list of two items: The first is the QMQRY variable and
the second is the CL variable / value. The posted SETVAR contains one
list containing two entries. The first entry is (NXTSAT) and the second
entry is ('140719'). What is probably desired is one entry, containing
two elements:

SETVAR((NXTSAT &NXTSAT6A))

--buck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.