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



The problem is neither the size of the array data structure nor the data
structure definition itself.
SELECT INTO only allows a single row to be received.
If you want to do a multiple row fetch, you need to DECLARE a cursor.


Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Gary Thompson
Gesendet: Thursday, 06.2 2014 15:35
An: RPG programming on the IBM i (AS/400 and iSeries)
Betreff: RE: Sql limitation on DS array

Chuck,
I copied example code to the midrange.com scratchpad
Name: Gary Thompson
Desc: SQL0312 30 57 Position 27 Variable X10DS not defined or not
usable.
http://code.midrange.com/02382d6fb5.html
Thank you

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of CRPence
Sent: Wednesday, February 05, 2014 4:38 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Sql limitation on DS array

On 05-Feb-2014 13:17 -0800, Gary Thompson wrote:
I commonly load a DS with Select or Fetch, but it seems a DS array
created from Extname has a limit as the target of an SQL statement and
the pre-compile complains with MsgId SQL0312 - why for ?

Perhaps a "for example" of some [a minimal] SQLRPGLE source that exhibits
the problem, posted to code.midrange.com to include additionally the DDL and
the CRTxxx specifications used [to include any parameters that might have
changed defaults, as explicitly specified] would be helpful to enable a
review of the failing scenario.?

I have a source coded for the scenario described in the following thread
[continued to the next month] that uses EXTNAME to define a DS, but then
uses a DIM() along with a LIKEDS() naming the DS defined with the EXTNAME().
No issues for -312. I did not review the thread to see if anything like I
coded was posted:
http://archive.midrange.com/rpg400-l/201310/threads.html#00433
http://archive.midrange.com/rpg400-l/201311/threads.html#00008

--
Regards, Chuck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.



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.