|
Hi,
DependsAgreed. For this situation, I usually just overlay the DS itself.
on what you're after (you lose some flexibility) but you might like:
d othGL 7p 0 DIM(30) Overlay(dsothr: 57)
d othGL_alpha 4 Dim(30) Overlay(dsothr: 57)
To avoid hardcoding the starting position I'd define the arrays as follows:
ddsothr ds
d othTicket# 1 7s 0
d othDate 8 13s 0
d othCust# 14 18s 0
d othTotal 19 25s 2
d othComment 26 50
d othNSF 51 51
d othGroup# 52 56s 0
D DSOthGL
d othGL 7p 0 DIM(30) Overlay(DSOthGL)
D othGL_Alpha 4A Dim(%Elem(OthGL))
Overlay(DSOthGL)
D FurtherSubFields...
Note: There is no additional definition for DSOthGL. It is defined by the
fields that overlay DSOthGL.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Dennis Lovelady
Gesendet: Wednesday, 21. April 2010 01:40
An: 'RPG programming on the IBM i / System i'
Betreff: RE: *INPUTPACKED ignored for arrays ?
"*RNF3733 An array cannot overlay another array; keyword OVERLAY isThen create a 120 alpha field, and have both arrays overlay THAT.
ignored."
BTW, I am using a DS for input:
ddsothr ds
d othTicket# 1 7s 0
d othDate 8 13s 0
d othCust# 14 18s 0
d othTotal 19 25s 2
d othComment 26 50
d othNSF 51 51
d othGroup# 52 56s 0
d othGL 7p 0 DIM(30)
...or overlay the data structure itself in starting in position 47.
...or use from/to notation.
...or use pointers.
Hardly a show-stopper.
Agreed. For this situation, I usually just overlay the DS itself. Depends
on what you're after (you lose some flexibility) but you might like:
d othGL 7p 0 DIM(30) Overlay(dsothr: 57)
d othGL_alpha 4 Dim(30) Overlay(dsothr: 57)
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"The unfortunate thing about this world is that good habits are so much
easier to give up than bad ones."
-- Somerset Maugham
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.