× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You need to use the overlay keyword. I have done this in the past by using
a ds similar to the following;

D DS
D FIELDDS 30A
D POQ1WB 10A OVERLAY(FIELDDS: 1)
D POQ2WB 10A OVERLAY(FIELDDS: 11)
D POQ3WB 10A OVERLAY(FIELDDS: 21)
D POQ LIKE(POQ1WB) DIM(3)


Paul Tuohy wrote an article on arrays in DS called make the most of arrays:

http://search400.techtarget.com/tip/0,289483,sid3_gci1178652,00.html

Gene

On 4/26/07, Joe D <nike@xxxxxxxxxxxxxx> wrote:

Hi All,

I am trying to create an array of identical fields from a file. I would
like to reference the 10 fields as POQ(1), POQ(2), etc.

I thought all I had to do was something like this:

D DS
D POQ LIKE(POQ1WB)
D DIM(10)
D POQ1WB
D POQ2WB
D POQ3WB
D POQ4WB
D POQ5WB
D POQ6WB
D POQ7WB
D POQ8WB
D POQ9WB
D POQ0WB

to group the 10 fields under POQ. I am making myself use more RPG IV and
I
must be remembering this bit wrong. I remember reading a great article
somewhere, but could not find it.

Although I see a value in POQ1WB, the value of POQ(1) is always blank.

Can someone point out what I am doing wrong/missing?
Thanks,
JD

--
This is the RPG programming on the AS400 / iSeries (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.