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



Just curious--can you use CLOB definitions to overcome that 32K limitation? CLOBs go up to 2GB. I have used CLOBs in both IBMi SQL stored procedures and IWS web (REST) APIs.

Thanks,

Kelly Cookson
Senior Software Engineer II
Dot Foods, Inc.
1-217-773-4486 ext. 12676
www.dotfoods.com


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon Paris
Sent: Friday, April 8, 2022 10:44 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: External Re: Stored Procedure with large result set

Yup - it is an SQL limitation. I thought they would have fixed that by now but apparently not.

Jon P.

On Apr 8, 2022, at 9:27 AM, Robert Rogerson <rogersonra@xxxxxxxxx> wrote:

Hi Jerry, could you be running into this restriction?

Using the multiple-row FETCH statement The multiple-row FETCH
statement can be used to retrieve multiple rows from a table or view
with a single FETCH statement. The program controls the blocking of
rows by the number of rows requested on the FETCH statement (The
Override Database File (OVRDBF) command has no effect.). The maximum
number of rows that can be requested on a single fetch call is 32 767.
After the data is retrieved, the cursor is positioned on the last row
retrieved.

Extracted from the IBM i Database SQL programming manual.

Sounds like you may be extending past the limit when you increase to 50,000.

Rob

On Fri, Apr 8, 2022 at 9:13 AM (WalzCraft) Jerry Forss
<JForss@xxxxxxxxxxxxx>
wrote:

Here is some of the code.

When I change the elements to 30000 it compiles. At 50000 it does not.

I have also tried it a Mult occurrence DS

// Result Set
Dcl-DS Results Dim(50000) Qualified Inz;
RCustNo Char(8);
RAttr Char(20);
RAttrDesc Char(100);
RAttrValue Char(100);
End-DS;

DIAGNOSTIC MESSAGES MSG
ID SEV RECORD TEXT
SQL5011 30 509 Position 29 Host structure array RESULTS not defined
or
not usable. Reason: The dimension of the host
structure
array is larger than what is supported by SQL.
Message Summary


Exec SQL
Set Result Sets Array :Results For :Row Rows;


-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Charles Wilt
Sent: Thursday, April 7, 2022 10:42 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: External Re: Stored Procedure with large result set

CAUTION: This email originated from outside of the organization. Do
not click links or open attachments unless you recognize the sender
and know the content is safe.

Jon,

Never said he was...given that he didn't mention the error, just that
it was a compiler error, I said it was an RPG limit..

Which one, I don't have enough info to know.

Charles


On Thu, Apr 7, 2022 at 4:32 PM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

There is no 32K array size limit in RPG Charles.

Jon P.


On Apr 7, 2022, at 1:00 PM, Charles Wilt <charles.wilt@xxxxxxxxx>
wrote:

I assume this is an RPG program/prodedure being used as a SQL
externally defined stored procedure?

How is the RPG generating the results set?

Sounds like you're trying to build an array(?) in RPG and return
that as
a
result set?
And running into RPG limits, in that case nope.

You'd need to switch to using an SQL cursor to return a bigger
result
set.

Charles

On Thu, Apr 7, 2022 at 10:54 AM (WalzCraft) Jerry Forss <
JForss@xxxxxxxxxxxxx> wrote:

Hi All,

I have a request for a Stored Procedure that will return a result
set
with
around 50,000 rows.
It seems the limit is set at around 32,000 rows, otherwise the pgm
will not compile.

There are over 3 million records in the file that I want to return
a subset.
This is called from the network side of the world.

Is there any way around this limit?



Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change
specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and
privileged information that is protected by law. The information
contained herein
is
transmitted for the sole use of the intended recipient(s) and
should
"only"
pertain to "WalzCraft" company matters. If you are not the
intended recipient or designated agent of the recipient of such
information, you
are
hereby notified that any use, dissemination, copying or retention
of
this
email or the information contained herein is strictly prohibited
and may subject you to penalties under federal and/or state law.
If you received this email in error, please notify the sender
immediately and
permanently
delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
https://urldefense.com/v3/__http://www.walzcraft.com__;!!BZnD2a2Aq
g!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5
dd7akGKDwYWdgEd5MU5Z04I1$
<https://urldefense.com/v3/__http://www.walzcraft.com__;!!BZnD2a2A
qg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR
5dd7akGKDwYWdgEd5MU5Z04I1$ > Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To
post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/lis
tinfo/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1
-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a
2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHh
PR5dd7akGKDwYWdgEd5MV0u761j$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To
post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/list
info/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y
71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2A
qg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5d
d7akGKDwYWdgEd5MV0u761j$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listi
nfo/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71
FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2A
qg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5d
d7akGKDwYWdgEd5MV0u761j$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listin
fo/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT
-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2Aq
g!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7
akGKDwYWdgEd5MV0u761j$



Subject to Change Notice:

WalzCraft reserves the right to improve designs, and to change
specifications without notice.

Confidentiality Notice:

This message and any attachments may contain confidential and
privileged information that is protected by law. The information
contained herein is transmitted for the sole use of the intended recipient(s) and should "only"
pertain to "WalzCraft" company matters. If you are not the intended
recipient or designated agent of the recipient of such information,
you are hereby notified that any use, dissemination, copying or
retention of this email or the information contained herein is
strictly prohibited and may subject you to penalties under federal
and/or state law. If you received this email in error, please notify
the sender immediately and permanently delete this email. Thank You

WalzCraft PO Box 1748 La Crosse, WI, 54602-1748
https://urldefense.com/v3/__http://www.walzcraft.com__;!!BZnD2a2Aqg!F
afq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akG
KDwYWdgEd5MU5Z04I1$
<https://urldefense.com/v3/__http://www.walzcraft.com__;!!BZnD2a2Aqg!
Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7ak
GKDwYWdgEd5MU5Z04I1$ > Phone: 1-800-237-1326
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listin
fo/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT
-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2Aq
g!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7
akGKDwYWdgEd5MV0u761j$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinf
o/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-v
EmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2Aqg
!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7ak
GKDwYWdgEd5MV0u761j$

--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.com/v3/__https://lists.midrange.com/mailman/listinfo/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MVBsEBoi$
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at https://urldefense.com/v3/__https://archive.midrange.com/rpg400-l__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MY-VeNiw$ .

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.com/v3/__https://amazon.midrange.com__;!!BZnD2a2Aqg!Fafq3MRw_qIJzPErk6cR-sDP0DSBCDf-C5A1-Y71FT-vEmDbfhQ0UH6K8DSHhPR5dd7akGKDwYWdgEd5MV0u761j$

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.