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



Thanks, Carel!

When I went to implement your suggestion I realized that I had been passing
the pointer to a fixed-length field from the display file instead of the
variable-length field I was using.

I changed the pointer to the variable-length field, changed the length calc
to SQLLEN = %len(%trimr(varfld)) as you suggested, and it works!

Thank you to all!
Gene

On 6/14/07, Carel Teijgeler <coteijgeler@xxxxxxxxx> wrote:

Gene,

In that case I would pass a pointer to a fixed length character variable
and define SQLLEN with SQLLEN = %len(%trimr(varfld)), i.e. use the %trimr
BIF on the variable.

Be aware to use wildcards in the value and putting the value in the
character varible does not require additional quotes. Just a reminder..

Regards,
Carel Teijgeler


*********** REPLY SEPARATOR ***********

On 14-6-2007 at 15:10 Gene Burns wrote:

>I guess I wasn't very clear on what I was trying to accomplish.
>
>The variable-length field is not in the database. It is a selection
criteria used for a substitution parameter in the where clause of the
select.
>This is provided by the OPEN USING DESCRIPTOR :SQLDA statement.
>
>This process works fine when the variable is a numeric or fixed-length
and
the comparison is field = ?
>
>But in this case I am trying to SELECT FLD1, FLD2, FLD3... WHERE FLD2
like
?
>and have the OPEN USING DESCRIPTOR :SQLDA provide the value found in the
variable length field, which could be anything from 1 to 15 characters. I
>am just having trouble getting the OPEN to work if the field is a
variable-length. I don't know how to determine the SQLLEN to use.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.