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.