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


  • Subject: Re: Passing Parms to Query
  • From: Marco Facchinetti <facchinetti@xxxxxxxxx>
  • Date: Wed, 13 Sep 2000 06:11:27 -0700 (PDT)

Yes, Paul is right, is a quoting problem, try to do
something like this:
 QUERYTEST:  PGM                                
 DCL VAR(&VALORECHAR) TYPE(*CHAR) LEN(3)             
 CHGVAR     VAR(&VALORECHAR) VALUE('''A''')                

 STRQMQRY   QMQRY(MARCO/PROVAPARM) QMFORM(*QMQRY) +        

            ALWQRYDFN(*YES) SETVAR((VALORE &VALORECHAR))  
 ENDPGM                                                    

--- paul cunnane <paul@cunnane.net> wrote:
> > I'm using a CLP variable as the SETVAR and I get an
> error saying  "
> 'xxxxx'
> > is not a column in the table"   Where xxxx is the value
> in my CLP
> variable.
> 
> Sounds like a classic quoting problem.
> 
> Suppose the column you are matching is called NAME, and
> you are trying to
> match the value 'Carr'.  The SQL statement would be
> ...WHERE NAME='Carr'.
> If the single quotes are omitted, or replaced with double
> quotes, you end up
> with ...WHERE NAME=Carr or ...WHERE NAME="Carr".  Both of
> these have the
> same meaning: where the value of the NAME column matches
> the value of the
> Carr column.
> 
> If this looks like a match for your problem, try simply
> wrapping your
> variable in single quotes before you pass it in.
> 
> --
> Paul
> 
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to
> RPG400-L@midrange.com.
> | To subscribe to this list send email to
> RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list
> owner/operator: david@midrange.com
> +---


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.