Can anyone help on why I am getting this SQL Pre processor error.
This is a function that receives a pointer to pre-allocated storage.
However I think DB2 is complaining because my host variable is based.
The DB2 manual says "If you use the BASED storage attribute, you must
follow it with a PL/I element-locator-expression."
DCL 01 API_STRUCTURE BASED(API_PTR) UNALIGNED,
05 TYPE CHAR(2),
05 PAYLOAD_CLOB,
07 PAYLOAD_LENGTH FIXED BIN(31),
07 PAYLOAD_DATA,
09 PAYLOAD_DATA1(128) CHAR(32767)
09 PAYLOAD_DATA2 CHAR(128);
API_PTR -> API_STRUCTURE;
EXEC SQL SELECT LOTS_OF_DATA
INTO :PAYLOAD_CLOB
FROM PP_MRA_SMT_01
WHERE TYPE = :API_STRUCTURE.TYPE;
DSNH312I E DSNHSMUD LINE 1950 COL 19 UNDEFINED OR UNUSABLE HOST
VARIABLE "PAYLOAD_CLOB"
Thanks in anticipation.
Moira
Have you tried using the SQL TYPE IS BLOB(blob-size) notation, instead?
--
John W. Kennedy
"When a man contemplates forcing his own convictions down another
man's throat, he is contemplating both an unchristian act and an act of
treason to the United States."
-- Joy Davidman, "Smoke on the Mountain"