|
Ok, I've tried google, I've searched the archives and checked otherlists.
And what seems like it should work, doesn't. So I turn to you RPGLEsubprocedure
wizards...
The Problem... I'm trying to pass a datastructure array to a
to do a "%lookup" since %lookup doesn't support qualified names. TheEntryDS
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
can' have (x) because its not an array. Doesn't the like DS mean thatit
is? And that it will automatically be qualified?use of the individual or entity to which it is addressed and may contain
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
--list
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
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 mailing list archive is Copyright 1997-2025 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.