×
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.
Thanks Tommy. Compiled perfectly. Although it really doesn't seem to
intuitive (for me at least) that you would need to add the Dim(20) to the
prototype. I would think that Dim(20) changes the *structure* a bit to
give it depth, but I guess I'm asking too much.
Anybody heard anything about %lookup support for qualified ds arrays? I
saw a post that was in the archives by Scott and Barbara that was from
2008. Just wondering if there has been any movement on this?
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/03/2009 02:52 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Passing Datastructure Array
it's not an array 8^) using LIKEDS only copies the *structure* of the
DS...not the number of elements add the DIM() on your prototype...
Thanks,
Tommy Holden
From:
Bryce Martin <BMartin@xxxxxxxxxxxx>
To:
rpg400-l@xxxxxxxxxxxx
Date:
08/03/2009 01:49 PM
Subject:
Passing Datastructure Array
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx
Ok, I've tried google, I've searched the archives and checked other lists.
And what seems like it should work, doesn't. So I turn to you RPGLE
wizards...
The Problem... I'm trying to pass a datastructure array to a subprocedure
to do a "%lookup" since %lookup doesn't support qualified names. The
problem is that I'm getting a compile error that says "RNF0528 Index is
not allowed for name that is not an array; index is ignored." It is
basically saying that the array in my PI isn't an array...
The Code...
D FindFSOds...
D PR 2s 0
D EntryDS LikeDS(sqlDS)
D ShopOrder...
D 6s 0
D
D sqlDS ds qualified Dim(20)
D Shop_Order...
D 6s 0
D Parent_SO...
D 6s 0
P FindFSOds...
P b
D FindFSOds...
D PI 2s 0
D EntryDS LikeDS(sqlDS)
D ShopOrder...
D 6s 0
D
D
D ArraySize...
D c Const(20)
D rtrnIdx...
D s 2s 0
D x...
D s 2s 0
/free
rtrnIdx = 0;
for x = 1 to ArraySize;
if EntryDS(x).Shop_Order = ShopOrder;
rtrnIdx = x;
leave;
endif;
endfor;
return rtrnIdx;
/end-free
P FindFSOds...
P e
******************************************************************end of
code
The compiler error points to the "if" statement and says that the EntryDS
can' have (x) because its not an array. Doesn't the like DS mean that it
is? And that it will automatically be qualified?
I'm confused. What am I missing?
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the use
of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---
As an Amazon Associate we earn from qualifying purchases.
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.