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



There is a trick I use with display files that may work with printer files.
You have to place standalone fields in the printer file, such as FIELD1,
FIELD2. Then, in your RPG you define a data structure and below that you
just list the fields. Then you overlay an array on that structure, as
follows. The trick is that somehow the compiler places the actual
printer/display fields in the datastructure, which allows you to move them
en-masse or use an array as shown here.

FieldCount C 2 // Constant for # of printer fields

PrtFlds DS
FIELD1
FIELD2
Parr like(FIELD1) dim(FieldCount) overlay(PrtFlds)





From: Buzz Fenner <bfenner@xxxxxxxxxxxxxxxx>
To: "Discussion RPG (RPG Discussion)" <RPG400-L@xxxxxxxxxxxx>
Date: 12/17/2015 01:51 PM
Subject: Printing array data
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



In new development, I'm shifting away from program-described to
externally-described printer files. However, whereas in a program I can
specify FIELD(1), FIELD(2), etc., in the O-specs, I can't use the same type
of field notation in DDS (or at least I'm getting whacked by the syntax
checker when I try it).

I was wondering how others approach this issue.

--
Buzz Fenner, Analyst/Systems Administrator
+1 (870) 930.3374 bfenner@xxxxxxxxxxxxxxxx<mailto:bfenner@xxxxxxxxxxxxxxxx>

City Water and Light of Jonesboro
Office: +1 (870) 935.5581 / Fax: +1 (870) 930.3301
Physical: 400 East Monroe Ave., Jonesboro, AR 72401
Mailing: PO Box 1289, Jonesboro, AR 72403-1289

This e-mail message may contain confidential or legally privileged
information and is intended only for the use of the intended recipient(s).
Any unauthorized disclosure, dissemination, distribution, copying or the
taking of any action in reliance on the information herein is prohibited.
E-mails are not secure and cannot be guaranteed to be error free as they
can be intercepted, amended, or contain viruses. Anyone who communicates
with us by e-mail is deemed to have accepted these risks. City Water and
Light of Jonesboro is not responsible for errors or omissions in this
message and denies any responsibility for any damage arising from the use
of e-mail. Any opinion and other statement contained in this message and
any attachment are solely those of the author and do not necessarily
represent those of the company.



________________________________

This electronic mail transmission may contain confidential or privileged
information. If you believe that you have received this message in error,
please notify the sender by reply transmission and delete the message
without copying or disclosing it.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 thread ...

Replies:

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.