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



From the SQL Programmers Guide:

The last field in an SQLVAR element is a varying-length character string
called SQLNAME. The first 2
bytes of SQLNAME contain the length of the character data. The character
data itself is typically the
name of a column used in the SELECT statement, in this case WORKDEPT. The
exceptions to this are
select-list items that are unnamed, such as functions (for example,
SUM(SALARY)), expressions (for
example, A+B-C), and constants. In these cases, SQLNAME is an empty
string. SQLNAME can also
contain a label rather than a name. One of the parameters associated with
the PREPARE and DESCRIBE
statements is the USING clause.

Hope this helps.

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295



I am trying to use open using descriptor :SQLDA in an SQLRPGLE program. I
am able to calculate the value for SQLLEN for a numeric and a fixed-length
character field and the program works.

However, I cannot figure out the length for the variable-length character
field.

I have tried all of the following without success.

SQLLEN = %len(varfld) * 256
SQLLEN = %len(varfld)
SQLLEN = *zero

The message I am getting is below with the specified length changing with
different entries to the field.

Message . . . . : Length in a varying-length or LOB host variable not
valid.
Cause . . . . . : Host variable *N was specified. The value in the
length
portion of the variable length or LOB host variable is either negative
or
greater than the declared length. If the host variable is graphic
the
length should be the number of DBCS characters. The host variable number
is
1. The specified length is 50902. The variable is declared to have
length

3840.
Recovery . . . : Change the length portion of the varying-length or
LOB
host variable to a valid positive number or zero. Try the request
again.

Anyone have any ideas?

Gene

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.