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



Here's some code I use to avoid using the ALT keyword:
D ds D aArray dim(1200) D aName like( NAME ) overlay(aArray) D aCity like( CITY ) D overlay( aArray: *next) D aAge like( AGE ) D overlay( aArray: *next) inz D aPhone like( PHONE ) D overlay( aArray: *next) inz
Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
I'm trying to add a prerun-time array to a program for the first time in
many years. After looking up the the nuances for a prerun-time array I
added the appropriate F and D specs. That's where the trouble began. I
need to add an alternating array which it sounds like I can do from the
documentation on coding a prerun-time array shown below from the RPG
Reference manual. However, the ALT keyword doesn't play nice with the
other keywords I need, specifically FROMFILE. The ALT keyword
documentation specifically says it cannot be used with FROMFILE. Am I missing something? Coding a Prerun-Time Array In addition to the essential array
specifications, you can also code the following specifications or
keywords for prerun-time arrays. On the definition specifications, you
can specify v The name of the file with the array input data, using the
FROMFILE keyword. v The name of a file to which the array is written at
the end of the program, using the TOFILE keyword. v The number of
elements per input record, using the PERRCD keyword. v The external
format of numeric array data using the EXTFMT keyword. v An alternating
format using the ALT keyword.

ALT(array_name) The ALT keyword is used to indicate that the
compile-time or pre-runtime array or table is in alternating format. The
array defined with the ALT keyword is the alternating array and the
array name specified as the parameter is the main array. The alternate
array definition may precede or follow the main array definition. The
keywords on the main array define the loading for both arrays. The
initialization data is in alternating order, beginning with the main
array, as follows: main/alt/main/alt/... In the alternate array
definition, the PERRCD, FROMFILE, TOFILE, and CTDATA keywords are not
valid.

Rick Chevalier
AmeriCredit ITS

817-525-7178



Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.