Bryan's RPG IV Journal
%SUBARR Problem with Indicators
Q: When I try the following operation:
eval %subarr(*in:50:5) = '00000';I get the following compile error: The expression is not valid for assignment to an indicator or indicator data structure. I get the same error when I try it without the 3rd parameter as
eval %subarr(*in:50) = '00000';A: I have not tried this on a a V5R3 machine, but...Try using a different array name pointing to *IN. Then use %Subarr with that array. Something along these lines:
D Ptr S * Inz(%Addr(*In))The compiler error seems to indicate that you cannot use %Subarr with the *In array (although the documentation does not mention this restriction). So, if you can get the indicators into another array, it might work.
D Indicators S 1 Dim(99)
D Based(Ptr)
/Free
%Subarr(Indicators:50:5) = '10101';
/End-free
Log of Journal Entries |
|
Use this scrollable blog map to view other journal entries: |
|
| It is your responsibility to ensure procedures, techniques, and code used from this website are accurate and appropriate for your installation. No warranty or support is implied or expressed. |
![]() |
| Privacy and Email Policy |
| AS/400®, eServer, i5/OS, IBM i, Integrated Language Environment®, iSeries, OS/400®, RPG/400®, System i5, VisualAge®, and WebSphere® are trademarks of IBM Corporation. Note: IBM® System i is the latest member of the family of eServer iSeries. This site might refer to System i as System i5, iSeries, or AS/400. |
|
If you are having trouble navigating the menu at the top of this page, you may use the following scrollable site map instead: |
|
|











International visitors: