|
Thanks Barbara, must have missed my previous thread (entitled "Printing arrays through externally described printer file") on this subject. At least I am not done with the program yet! :-) -----Original Message----- From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com] Sent: Monday, March 04, 2002 5:16 PM To: rpg400-l@midrange.com Subject: RE: Divide by zero monitoring >From: "Wills, Mike N. (TC)" <MNWills@taylorcorp.com> >Date: Mon, 4 Mar 2002 16:07:58 -0600 > >They are in arrays... however since there is no easy way to print the array >contents to an externally described printer file, I am forced to have one >line of logic for each field to print. I would not have bothered asking the >question if I had it in a loop. Mike, code your externally-described printer file fields like this. Just list the names; don't code any type information. D prtds ds D prt1 D prt2 D ... D prt12 D prtArray like(prt1) overlay(prtds) D dim(12) Then you can use prtArray when you want to reference the fields as an array. Maybe it's not easy, but I think it's easier to list the 12 fields than it is to code the same logic 12 times. Barbara Morris _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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 mailing list archive is Copyright 1997-2025 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.