473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DB2 Host variables - PL/1 locator reference

Hi,

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
Sep 16 '08 #1
0 1967

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris | last post by:
I have tableA, defined as: field1 varchar2(10), field2 varchar2(10), field3 varchar2(10) I have host variables defined as: v1 pic x(10) varying v2 pic x(10) varying
4
by: Mich | last post by:
Hi, Looking for a store locator in javascript, with data for 80 stores in the code, with other words, no external database, server will not run php. Will pay if nescessary. Urgent.
3
by: Anthony Robinson | last post by:
We're encountering an issue with working with CLOB's. We're doing a basic insert into a table that has a CLOB column. Sometimes the CLOB is fairly tame in size (10k-15k), and once in a while...
6
by: tigr | last post by:
I am trying to read BLOBs from a large table (i.e., greater than 34K rows) using Java and the IBM JDBC driver (actually through an Application server). I get the following: SQL0429N The...
3
by: claus.hirth | last post by:
Does the term 'host variable' cover a variable locally declared in a SQL-PL stored procedure? I am asking this question in the context of the SELECT INTO statement.
2
by: stiv | last post by:
I'm in the process of designing a store locator database that i searchable for the retail stores in a city and state. Which would b better to impliment the city/state query or is it zipcode based...
14
by: Frank Swarbrick | last post by:
A few weeks ago I had posed a question about how one my create a cursor for a query where the predicate condition is dynamic. Meaning that the query might want to have one of several possible...
7
by: misha | last post by:
Hello. I was wandering if someone could explain to me (or point to some manual) the process of mapping the addresses of host variables by DB2. Especially I would like to know when DB2 decides to...
5
by: Patrick | last post by:
Hi all, In my SQL procedures in DB2 8.2, I current declare several cursors that return select statements with 10 columns in it. As a result, assigning host variables becomes a coding mess, as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.