|
From Al Mac - here's how I do that I create a data structure (DS) in the input specifications in which I overlay CDE (array) CDE01 CDE02 CDE03 etc. fields such that CDE,1 is the same place as CDE01 CDE,2 is the same place as CDE02 etc. When the physical file is read, the data automatically also goes into the data structure spaces CDE01 CDE02 etc. overlaying the CDE array contents. Depending on how you access the physical file, you may wish to have one array for input / output and another for processing within the calculations. If you have a very large array, remember that output specifications & other places in the code need to fit in the array identification within 6 positions ... so you want to avoid either long array names or long indexes. PER,MO for example (period month) fits, but nothing longer fits. > From: oertlim@s054.aone.net.au (Matthias Oertli) > > Hi, > I have an externally defined physical file. Within each record there > are numeric fields named like CDE01, CDE02, ... CDE20. > > Within the RPG I would like to map these fields into an array for > easier processing. I've done this with display files but I can't work > out how to do it with a physical file. > Thanks for your help. > Regards, > Matthias Alister William Macintyre Computer Data Janitor etc. of BPCS 405 CD Rel-02 on 400 model 170 OS4 V4R3 (forerunner to IBM e-Server i-Series 400) @ http://www.cen-elec.com Central Industries of Indiana--->Quality manufacturer of wire harnesses and electrical sub-assemblies +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
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.