|
But it is possible to use a named constant, e.g. DMaxElements s const(9999) DDSARRY ds dim(MaxElements) qualified D RAKEMP like(CAKEMP ) D RAKFNAM like(CAKFNAM) D RAKLNAM like(CAKLNAM) D RAKJBTTL like(CAKJBTTL) This is useful if you have several arrays which should all have the same number of elements; it gives you one place to define that number, which should make it clearer to the next programmer that they're supposed to be the same. hth, Peter Dow Dow Software Services, Inc. www.dowsoftware.com 909 793-9050 voice 909 793-4480 fax > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Barbara Morris > Sent: Tuesday, September 06, 2005 2:49 PM > To: rpg400-l@xxxxxxxxxxxx > Subject: Re: *varsize array as procedure parameter > > > "Mohammad, Tanveer" wrote: > > > > Ok, here is my problem. "Options(*varsize)" is not allowed for DS Array. > > > > I am trying to define the array like this. Is it possible to define > > 9999 array using some variable? > > > > DDSARRY ds dim(9999) qualified > > D RAKEMP like(CAKEMP ) > > D RAKFNAM like(CAKFNAM) > > D RAKLNAM like(CAKLNAM) > > D RAKJBTTL like(CAKJBTTL) > > > > No, it's not possible to have DIM(variable). But you can keep track of > the number of "real" elements in a separate variable and use that > variable in several RPG array operations. See the section called "Using > Dynamically-Sized Arrays" in Chapter 9 of the ILE RPG Programmer's > Guide: > http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/rzajp/sc09 2508.pdf. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.18/91 - Release Date: 9/6/2005
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.