× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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:

SELECT NAME,TOTAL
 FROM MASTER
 WHERE &WHERE
 ORDER BY NAME

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

  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.