|
Maybe problem is in return value of %lookup bif in your IF statement
(index of matching element or 0 if element wasn't found) and second thing,
does second parameter of %LOOKUP can be expresion (getArray() in this case
is expression try tmpArray=getArray() and pass tmpArray to %LOOKUP).
Igor Bešlić, dipl. ing. rač.
VOLKSBANK d.d.
OJ Informatika
Varšavska 9, 10000 Zagreb
tel: +385 1 4801 895
"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12.01.2006 23:45
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
compile error on %lookup where array is the return value of a procedure
Any idea why I'm getting this compile error? "*RNF0571 20 37 000300
The second parameter for %LOOKUPxx is not valid."
D getArray pr 3 dim(8)
C if %lookup(' ' :getArray())
C endif
C eval *inlr = *On
*******************************************************
P getArray B
D pi 3 dim(8)
D prArray s 3 dim(8)
C return prArray
P getArray E
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.