Dan said:

>I followed up on the thread earlier of
>passing parms to a query,
>and the results were good.

>SETVAR((LODATE 1011001))
>beautiful, but I tried it with
>SETVAR((LODATE *GE 1010101))
>and I get the error:
>Too many values in list for parameter SETVAR.
>I looked STRQMQRY up in the manuals (remember
>them) from V3R2 and it used the example of VAR1
>and VAR2 being SQL statements, but gave no
>indication of where these two variables belonged
>in the QUERY definition.

The error message is probably right.  The 'list of values' that SETVAR wants
are simple pairs:
((PARM1 value1)
 (PARM2 value2)
 (PARM3 value3))

SETVAR is confused because there are three things inside the parentheses,
not a pair.

The parameters (PARMn) relate to the QMQRY source directly:
select a,b,c from file where
  field1 = &PARM1 and
  field2 < &PARM2 and
  field3 > &PARM3

If you want to change the operator (in this case the *GE) you need to change
the underlying QMQRY sort of like this:


It would execute various scenarios like this:
strqmqry master3 setvar((where 'TOTAL = 0'))
strqmqry master3 setvar((where 'TOTAL > 5'))


This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page