75 pts.
 RPG Free Array Processing Problem
If you've seen this question before it's because when I add my code and submit and view it, it is unreadable. I'm trying to get a "clean" representation of my question. Thanks for your patience.

I have loaded a data structure from a database file with three 3 byte fields, i.e. 100101102. It loads into the array just fine. Now, I want to pick the first element of the array and process it's content, then the second element and the third. Currently, Im attempting to load the first element into a 3 byte standalone field with the %subarr BIF and I get the message (Array has too many omitted indexes) when compiling. Someone in another forum, different problem, said the receiver value must be a %subarr also. Does anyone have any examples of something like this?

Thanks in advance.

Below is my code:

Fmaster if e k disk

 

Dx s 3u 0

Dy s 3u 0

Ditmtype s 3a

Darr1 s 9 dim(1000)

 

Dtypes ds

D type1 3a

D type2 3a

D type3 3a

 

/free

x = 1;

read master;

dow NOT %eof(master) and x <= 600;

arr1 = types;

dow x <= 3;

itmtype = %subarr(arr1:x:3);

x = x + 1;

enddo;

read master;

enddo;

 

*inlr = *on;

 

/end-free

The array loads just the way I want it.



Software/Hardware used:
RPG ILE,iSeries,V5R4
ASKED: December 2, 2010  3:21 PM
UPDATED: December 4, 2010  1:06 AM

Answer Wiki:
Please see responses to earlier copies of this question -- <a href="http://itknowledgeexchange.techtarget.com/itanswers/rpg-free-array-processing/">RPG Free Array Processing</a>. If the problem isn't resolved, please continue the discussion in that question. Tom
Last Wiki Answer Submitted:  December 4, 2010  1:06 am  by  TomLiotta   107,735 pts.
All Answer Wiki Contributors:  TomLiotta   107,735 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _