data_Template isn't a DS array - it's just a DS.

Assuming these really are 'template' variables, then why are you doing a
lookup on one - surely you should be doing a lookup an a separate array DS
which is defiend as being LIKEDS(Data_Template)?



On Thu, Jul 19, 2012 at 9:12 AM, Amanda Paul <amandapaul1@xxxxxxxxxxx>wrote:


d additionaldata_Template...
d ds qualified based(dummy_ptr)
d data likeds(data_Template) dim(9)
d
d data_Template ds qualified based(dummy_ptr)
d name 32a
d value 32a
*;




My code is as below , my declaration of DS is as above. The second
parameter in lookup I coded an array.
Could you please let me know why I am getting this error and how to fix
it. Thanks!

w_idx1 = %lookup(*blanks:data_Template);
w_idxITM = w_idx1-1;


The second parameter for %LOOKUPxx is not valid.

20

Cause . . . . . : The second parameter for built-in function %LOOKUP,
%LOOKUPGE, %LOOKUPGT, %LOOKUPLE, or %LOOKUPLT must be the name of an array.
In addition, it must be the same type and have the same CCSID as the first
parameter. The built-in function is ignored.

Recovery . . . : Correct the second parameter for the built-in function.
Compile again
--
This is the RPG programming on the IBM i / System i (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.