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



I usually do something like this:

D Methods DS
D LxCigs
D LxChew
D LxSnuff
D LxSmokel
D LxCigars
D LxLittle
D LxRolling
D LxPlug

D MethArr Overlay(Methods)
D Like(LxCigs) Dim(8)

The LX fields are non-contiguous fields in a table defined in the F-specs in
this case.

Jerry C. Adams
IBM i Programmer/Analyst
Hating the Yankees isn't part of my act, it is one of those exquisite times
when life and art are in perfect conjunction. -Bill Veeck
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of sjl
Sent: Friday, March 11, 2011 12:59 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Overlaying fields within a data structure with an array

Sorry -

I did not correctly define my problem.

FileX has more than just allowance amount fields, but within it there are 5
contiguous fields containing the allowance amount. Because of this, I can't

define the allowance array to override the entire FileX record...

For example, FileX has the following fields:

OrderNbr
ItemNbr
Price
Allowance1
Allowance2
Allowance3
Allowance4
Allowance5

Now how do I do it?

- sjl


Mark wrote:

dsfileX ds likerec( Irecx : *Output )
D FieldArray Like( PackedField )
D Dim( 5 ) Overlay( SFileX )

should do the trick.





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.