|
Thank you. Does the following help:
Expression Monitors:ACD0020:0
FETCHSTMT = Fetch C1 into :PackedK, :Alpha, :AlphaR [[1] : *PGM
ROUTINES/ACD0020[249]]
SQLCA [[1] : *PGM ROUTINES/ACD0020[106]]
SQLAID = SQLCA
SQLABC = 000000136.
SQLCOD = -000000312.
SQLERL = 0040.
SQLERM = PACKEDK
SQLERP = QSQPLIST
SQLER1 = 000000000.
SQLERR = null
SQLERRD(1) = 000000000.
SQLERRD(2) = 000000000.
SQLERRD(3) = 000000000.
SQLERRD(4) = 000000000.
SQLERRD(5) = 000000016.
SQLERRD(6) = 000000000.
SQLER2 = 000000000.
SQLER3 = 000000000.
SQLER4 = 000000000.
SQLER5 = 000000016.
SQLER6 = 000000000.
SQLWRN = null
SQLWN0 = ' '
SQLWN1 = ' '
SQLWN2 = ' '
SQLWN3 = ' '
SQLWN4 = ' '
SQLWN5 = ' '
SQLWN6 = ' '
SQLWN7 = ' '
SQLWN8 = ' '
SQLWN9 = ' '
SQLWNA = ' '
SQLSTT = 42618
PACKEDK = 000000000000000000000000000000. [[1] : *PGM
ROUTINES/ACD0020[69]]
ALPHA = null [null]
ALPHAR = null [null]
And from the joblog:
Message ID . . . . . . : SQL0312 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Date sent . . . . . . : 01/25/02 Time sent . . . . . . :
13:56:02
Message . . . . : Variable PACKEDK not defined or not usable.
Cause . . . . . : The variable PACKEDK appears in the SQL statement, but
one
of the following conditions exists:
-- No declaration for the variable exists.
-- The attributes are not correct for the use specified.
-- The host variable was specified in dynamic SQL. Host variables are
not
valid in dynamic SQL.
-- In REXX, host variable names cannot contain embedded blanks.
-- The variable name is used in the routine body of an SQL procedure or
function, but the variable is not declared as an SQL variable or
parameter.
The scope of an SQL variable is the compound statement that contains the
declaration.
-- The variable is used in the routine body of an SQL trigger, but the
variable is not declared as an SQL variable or the variable is an OLD
transition variable and cannot be modified.
Recovery . . . : Do one of the following and try the request again.
-- Verify that PACKEDK is spelled correctly in the SQL statement.
-- Verify that the program contains a declaration for that variable.
-- Verify that the attributes of the variable are compatible with its
use
in the statement.
-- Use parameter markers in dynamic SQL instead of host variables.
-- Remove embedded blanks from REXX host variable names.
-- Declare the variable as an SQL variable or parameter in the SQL
procedure or function.
-- Declare the variable as an SQL variable or specify a NEW transition
variable when the variable is modified in an SQL trigger.
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
"Rolf Mittag"
<mailing-lists@r-m To: <rpg400-l@midrange.com>
-e-d-v.de> cc:
Sent by: Fax to:
rpg400-l-admin@mid Subject: RE: Fetching into
different host variable types
range.com
01/25/2002 01:41
PM
Please respond to
rpg400-l
you got :
SQL0312 SQLCODE -312 SQLSTATE 42618
Explanation: Host variable &1 not defined or not usable
unfortunately you didn't include the declaration of
PackedK, Alpha, AlphaR
I would start looking at that place
hth Rolf
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
! Dipl.Inf.(FH) Rolf P Mittag IBM Partner in Development !
! Leipziger Str. 50 D-69214 Eppelheim !
! Fon: +49 (6221) 76 78 60 Fax: +49 (6221) 76 80 26 /"\ !
! eMl: rm@r-m-e-d-v.de \ / !
! X !
! ASCII Ribbon campaign against HTML E-Mail / \ !
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 mailing list archive is Copyright 1997-2025 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.