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



I would tend to agree with Alan about the based keyword.

The ability to select into a dim'ed array was added in v5r4 if I'm not
mistaken and I have had compile time errors as well when using keywords on
the array definition. Namely extname for an eds or refering to another data
structure that is an eds using the likeds keyword.

If anyone can shed some light on what keywords are not allowed when
defining a dim'ed array to be used with SQL I would like to hear it too.

Robert Newton
EDPS
Electronic Data Processing Services
Software Engineer
rnewton@xxxxxxxxxxxxxxxxx

This communication is confidential and is intended to be privileged. If
there is a problem with this transmission, please contact the sender. If
the reader of this message is not the intended recipient, or the employee
or agent responsible to deliver it to the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.



Adam Glauser
<adamglauser@wlua
lumni.ca> To
Sent by: rpg400-l@xxxxxxxxxxxx
rpg400-l-bounces@ cc
midrange.com
Subject
Re: Dim and multiple rows in SQL.
05/06/2008 08:29
AM


Please respond to
RPG programming
on the AS400 /
iSeries
<rpg400-l@midrang
e.com>






Alan Campin wrote:
Anybody got any idea why this would not work? We are at V5R4 and it is
my understanding that multiple dimension array for an SQL statement can
either be an OCCURS or a DIM but the DIM does not compile.

I have some similar code which works well. The only difference I can
see is the use of the BASED keyword. Seems unlikely to be the problem,
but it might be worth checking what happens without that?

Probably won't help your compiler error, but you may want to consider
using a host variable for the FOR x ROWS part of your statement:


D proList...
D DS qualified
D dim(100)
D OT...
D 3P 0
D id...
D 7P 0

D maxPros...
D S 3P 0 inz(%elem(proList))


exec sql FETCH NEXT FROM problemDetails
FOR :maxPros ROWS
INTO :proList;
--
This is the RPG programming on the AS400 / 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 ...

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.