× 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.



> I have tried passing variables to the following QMQRY def, but no luck:
>
> UPDATE CSWFLOP SET WFIDCR = &TO WHERE WFIDCR = &FROM
>
> using the CL command:
>
> STRQMQRY QMQRY(CSWFLOP01) SETVAR(('&TO' 'TDER4') ('&FROM' 'TDER3')
> which returns the love note:
> '&TO is not a valid Query Management variable.'
>
> so I tried:
> STRQMQRY QMQRY(CSWFLOP01) SETVAR((TO 'TDER4') (FROM 'TDER3'))
> with a new message:
> 'Column TDER4 not in specified tables.'
>
> I looked in the archives and found references to adding multiple single
> quote marks, but again, nada.
>
> This cannot be that difficult.  What am I missing?

Bill answered with:

Should be:
StrQMQry qmqry(cswflop01) setvar((&to '''TDER4''') (&from '''TDER3''')

Note: those are 3 consecutive single quotes.

But when I try to compile this into a CL, I get the message:

* CPD0727 40  Variable '&TO        ' is referred to but not declared.
* CPD0727 40  Variable '&FROM      ' is referred to but not declared.

So I declare it, and get the run time error:

  1114 - STRQMQRY QMQRY(CSWFLOP01) SETVAR((' ' '''TDER4''') (' '
  '''TDER3'''))
 is not a valid Query Management variable.


When I try to run from a command line:

StrQMQry qmqry(cswflop01) setvar((&to '''TDER4''') (&from '''TDER3'''))

I get the messsage:
Variable &FROM not allowed for parameter SETVAR.
Variable &TO not allowed for parameter SETVAR.
Error found on STRQMQRY command.


I am still missing something here.  Any ideas?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.