× 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.



Hi Joe,

How about something like this?

D dsPOQ ds
D POQ1WB
D POQ2WB
D POQ3WB
D POQ4WB
D POQ5WB
D POQ6WB
D POQ7WB
D POQ8WB
D POQ9WB
D POQ0WB
D POQ LIKE(POQ1WB)
D DIM(10)
D overlay(dsPOQ:1)

Regards,
Geoff

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe D
Sent: Friday, 27 April 2007 1:11 PM
To: RPG programming on the AS400 / iSeries
Subject: Array DS Question

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


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.