|
I'm trying to use the following multi-row fetch in an embedded SQLsqlstt = 07002 on the fetch statement.
program on V5R2:
d fm s 30a dim(300)
d sql_num c const(300)
c/exec sql
c+ include sqlda
c/end-exec
c/exec sql
c+ declare c1 cursor for
c+ select formidcf
c+ from formtabl01
c/end-exec
c/exec sql
c+ open c1
c/end-exec
c/exec sql
c+ fetch c1 for 300 rows
c+ using descriptor :sqlda into :fm
c/end-exec
c/exec sql
c+ close c1
c/end-exec
The program compiles just fine, but when it runs I receive sqlcod = 804,
value of SQLTYPE is &3, and the value of SQLLEN or SQLLONGLEN is
Message Text: SQLDA not valid.
Cause Text: If the error type is 2, 3 or 9, the entry in error is &2, the
&4. The specified SQLDA is not valid because of error type &1. Error typesand their meanings are:
between 0 and 8000, the value of SQLD is greater than the value of
* 1 -- The value of SQLN is less than zero, the value of SQLD is not
SQLN, or that the value of SQLD has not been initialized in REXX.is not supported or has not been initialized in REXX. The
* 2 -- The value of SQLTYPE is not valid or that the value of SQLTYPE
types that are not supported in REXX are NUL-terminated graphic string,NUL-terminated character string, PASCAL L-string, sign leading
separate, and binary with precision and scale.value of SQLLEN, SQLPRECISION, or SQLSCALE has not been initialized in
* 3 -- The value of SQLLEN or SQLLONGLEN is not valid or that the
REXX. If REXX and SQLTYPE is decimal or numeric, then either SQLPRECISIONor SQLSCALE has not been initialized. Otherwise, SQLLEN
has not been initialized. If SQLTYPE is a LOB variable, then SQLLONGLEN isnot valid.
* 4 -- Size of the SQLDA area was not large enough for the number ofentries specified in SQLN statement.
* 5 -- The SQLDA area was not on a 16-byte boundary.either not large enough for the number of entries specified in SQLN or
* 6 -- The value specified for SQLDABC is not valid. The value is
the value is greater than the maximum allowed.LOB host variables were found in the SQLDA.
* 7 -- The value of SQLN was not at least twice the size of SQLD and
* 8 -- The seventh byte of SQLDAID was not a '2', '3' or '4' and LOBhost variables were found in the SQLDA.
* 9 -- The SQLDATAL pointer was not null for a DBCLOB host variable,but the length value referenced by the SQLDATAL pointer had
an odd value.associated with LOB locator.
* 10 -- The SQLTYPE for a LOB locator did not match the type
* 11 -- The row length is greater than the maximum allowed row length.error type that it talks about? The SQLTYPE = 6448 and SQLLEN =
The information from the info center is not exactly helpful. Where is the
6448 after the open. SQLLONGLEN does not exist according to debug.
As an Amazon Associate we earn from qualifying purchases.
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.