Here is how I process identically sized fields. There may be other ways...

 *** This code operates on the assumption that all the fields in
 *** FIELDDS are the same size. field1..24 are in file somefile.

fsomefile  up   e             disk

d fieldds         ds
d  field1
d  field2
d  field3
 * ...
d  field22
d  field23
d  field24
d   fieldarray                        dim(24) overlay(fieldds)

c     1             do        24            x
 * manipulate FIELDARRAY(X) ---> points to field 1..24
 *                  eval      fieldarray(x) = something
c                   enddo
c                   update    somefile

HTH,
Loyd

-----Original Message-----
From: Gary Kuznitz [mailto:docfxit@theoffice.la]
Sent: Thursday, January 10, 2002 2:25 PM
To: Midrange-l@midrange.com
Subject: How to Define input fields into Array


Hi,

I have a file that is externally describe.  24 of the fields I need to
process
identically and I would like to process them with an array.  The array I
have
setup is:
D MEETINGS        S              5    DIM(24)

Is there an easy way to re-define the input specs to get all the fields into
the
array?  Or do I have to enter them into the array in calcs? I'm using RPGILE
V4R4.

TIA,

Gary Kuznitz

PS:  I'd appreciate it if you could show me an example in code.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.