AS/400 SQL BLOBS
25 pts.
0
Q:
AS/400 SQL BLOBS
I am trying to read data from a SQL table that contains a BLOB of 10MB.  Since the RPG field size is limited to 32KB, is this even possible?

Software/Hardware used:
AS/400SQL
ASKED: Aug 17 2009  6:13 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
6540 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Yes you can if you use embedded SQL in your RPG program to do the file access.
Last Answered: Aug 18 2009  3:48 PM GMT by CharlieBrowne   6540 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Yorkshireman   3200 pts.  |   Aug 19 2009  7:32AM GMT

Actually folks, RPG fields are 64k - this form the 5r4 manual

RPG IV Restrictions
Function
Restriction
Array/table input record length for compile time
Maximum length is 100
Character field length
Maximum length is 65535 bytes
Graphic or UCS-2 field length
Maximum length is 32766 bytes
Control fields (position 63 and 64 of input specifications) length
Maximum length is 256
Named data structure length
Maximum of 65535
Unnamed data structure length
Maximum of 9999999
Data structure occurrences (number of)
Maximum of 32767 per data structure
Edit Word
Maximum length of 115
Elements in an array/table (DIM keyword on the definition specifications)
Maximum of

 

Cwc   3860 pts.  |   Aug 19 2009  1:22PM GMT

In 6.1 of the operating system, the RPG limits have been significantly increased, such as field sizes up to 16MB.

What release is your system on?

 

Newsqluser   25 pts.  |   Aug 19 2009  1:39PM GMT

We are currently at v5r4 and will be going to v6r1, but I’m trying to get my head around how to read a 100MB field into an RPGSQL program. I’ve seen some examples using the BLOB locator, and I think that this is the way to do it, but I guess I need to research a little more. I appreciate all of your comments.

 

Cwc   3860 pts.  |   Aug 20 2009  4:19PM GMT

In case you haven’t seen this already, here’s a good article about dealing with BLOBs and CLOBs within RPG with SQL.

 

Cwc   3860 pts.  |   Aug 20 2009  4:20PM GMT

Well, links don’t seem to work here for the time being. Hopefully, this URL will go through legibly, to where you can copy and paste it.

 <a href="http://www.ibmsystemsmag.com/ibmi/developer/8394p1.aspx" title="http://www.ibmsystemsmag.com/ibmi/developer/8394p1.aspx" target="_blank">http://www.ibmsystemsmag.com/ibmi/develo…</a>

 

Newsqluser   25 pts.  |   Aug 20 2009  5:41PM GMT

Cwc, I think your links gave me the information I have been looking for. This should help alot. To all those that took the time to add their comments, thank you.

 
0