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



Page 99 of SQL Embedded SQL programming:

Declaring LOB host variables in ILE RPG applications that use SQL:

ILE RPG does not have variables that correspond to the SQL data types for
LOBs (large objects).

To create host variables that can be used with these data types, use the
SQLTYPE keyword. The SQL precompiler replaces this declaration with an ILE
RPG language structure in the output source member. LOB declarations can be
either standalone or within a data structure.

LOB host variables in ILE RPG applications that use SQL:

Here are some examples of LOB host variables (CLOB, DBCLOB, BLOB) in ILE RPG
applications.
...
BLOB example The following declaration:
D MYBLOB S SQLTYPE(BLOB:500)

results in the generation of the following structure:

D MYBLOB DS
D MYBLOB_LEN 10U
D MYBLOB_DATA 500A

HTH
MarcoF

2010/9/7 Needles,Stephen J <SNEEDLES@xxxxxxxxxxxxx>

I really need a bit of feedback here!!

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Needles,Stephen J
Sent: Friday, September 03, 2010 9:58 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: SQL5011 error when accessing remote (seperate LPAR) DB

I am getting an SQL5011 error when compiling my program.

The error states:

"Position 25 Host structure array TWFPDFDS not defined or not usable."

This is part of an SQL to fetch multiple rows into a data structure.

This is the data structure:

D TWFPDFDs E Ds Extname(TWFPDF) occurs( 9999
)

The TWFPDF table resides on a remote system i.

Here is the bit of the RPG code:

Exec sql SET CONNECTION :srcBox ;
Exec sql SET schema :srclib ;

Exec Sql DECLARE input CURSOR FOR
Select * from TWFPDF;
exec sql open input;
exec sql fetch input for 9999 rows
into :TWFPDFDS;

The compile error happens on this fetch. I've done this before and I am
actually cloning an existing process that works...the only unusual item
might be this table's definition.

It only contains three columns; the first two are character and are 17 and
20 characters. The third and final column is a *BLOB.

Is this BLOB the problem?

I need to send the data within this table across LPARs on a monthly
schedule. Just trying to evaluate possibilities other than
save/FTP/restore.

Thanks!

Steve Needles


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.