Hello Valerio,

You wrote:
>Now I need to add a LIKE selection, but, I can't find the syntax that
>would bring up the "Specify Dependent Value Qualifiers" screen. Does
>anybody know if LIKE as host variable is supported and what's the
>correct syntax for coding it in Query/400?

 CUSNAM            LIKE   :name

>I know I can have it working by creating a source in QQMQRYSRC with SEU
>and then run it with a regular strqmqry command, but I'm curious to know
>if it can be done under Query/400.

No, it can't.  If you code the above you will receive message QRY2234 -
Value not correct, cursor at position to check for error.

The second-level text for that message is fairly explicit:

Cause . . . . . :   The cursor indicates the part of the value in error.
If the cursor is at the end of the value line, it may mean that part of
the value is missing.
     Some types of errors are:
     -- Wrong separator:  Separate RANGE, LIST, and NLIST values with
spaces.
     -- Wrong type of value:  Use constants, not fields, as LIST and NLIST
   values.  Use a character constant enclosed in apostrophes for the LIKE
or NLIKE value.  Use the NULL keyword for the IS or ISNOT value (example:
   PARTCODE ISNOT NULL).
     -- Misplaced characters:  For numeric constants, place + or - before
the number, not after.  Example: NUMBER1  RANGE  -20 -10
     -- Characters not allowed:   Enclose constants inside apostrophes.
   Example: PARTCODE  LIST  '9X20224' '6Paaa4'.

The relevant part is:
"Use a character constant enclosed in apostrophes for the LIKE or NLIKE
value."

The same problem occurs with LIST and NLIST.  It does seem a silly
restriction.  Perhaps you should create a DCR and get it changed?

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists
   http://www.flybynight.com.au/

   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.