|
Your code looks reasonable to me. I would expect it to work, too. I have
some advice based only on my meandering experience.
At some point I ran into trouble overlaying directly over the DS name. I,
also, adopted the idea a character field overlaying the record format.
Every overlay from that point is over the character field. And use *next on
the first field in the overlay, too.
DDSINPUT E DS EXTNAME(DSUPDPAG)
D DSInPutFld Overlay(DSInPut)
D $fill1 like(QZSESS ) overlay(DSInPutFld:
*next)
D $fill2 like(QZBTCH ) overlay(DSInPutFld:
*next)
D $fill3 like(QZREF ) overlay(DSInPutFld:
*next)
D $QzAmt like(QZAMT1 ) overlay(DSInPutFld:
*next)
D dim(12) inz(0)
D $QzChk like(QZCHK1 ) overlay(DSInPutFld:
*next)
D dim(12)
This is freehand code after a cut & paste from your code. If I missed
something, sorry. I'm only try to give you an idea of what I do.
Patrick Conner
www.ConnecTown.com
(828) 244-0822
"Richard B Baird"
<rbaird@esourceconsu To: rpg400-l@midrange.com
lting.com> cc:
Sent by: Subject: data structure
overlay question.
rpg400-l-admin@midra
nge.com
01/03/02 01:10 PM
Please respond to
rpg400-l
hey all,
I'm not really clear about the ins and outs of overlaying data structure
subfields, I was hoping someone could lend a hand.
(see code below) I'm having trouble overlaying arrays $QzAmt and $QzChk to
redefine QZAMTx and QZCHKx fields.
When run in debug, QZSESS and $fill1 have the same value, but that's where
the overlays end.
fill2 and 3, as well as the two arrays have blanks (hex 40) and when
DSINPUT is displayed in debug, it appears that only $fill1 overlays the
data structure. the rest are appended to the end of it.
I know I've got this wrong somehow. Can anyone guide me?
this is what my code looks like:
Thanks in advance,
Rick
----
DDSINPUT E DS EXTNAME(DSUPDPAG)
D $fill1 like(QZSESS ) overlay(DSINPUT)
D $fill2 like(QZBTCH ) overlay(DSINPUT:*next)
D $fill3 like(QZREF ) overlay(DSINPUT:*next)
D $QzAmt like(QZAMT1 ) overlay(DSINPUT:*next)
D dim(12) inz(0)
D $QzChk like(QZCHK1 ) overlay(DSINPUT:*next)
D dim(12)
external data structure DSUPDPAG looks like this:
1 25 A QZSESS
26 31 S 0 QZBTCH
32 35 S 0 QZREF
36 43 S 2 QZAMT1
44 51 S 2 QZAMT2
52 59 S 2 QZAMT3
60 67 S 2 QZAMT4
68 75 S 2 QZAMT5
76 83 S 2 QZAMT6
84 91 S 2 QZAMT7
92 99 S 2 QZAMT8
100 107 S 2 QZAMT9
108 115 S 2 QZAMTA
116 123 S 2 QZAMTB
124 131 S 2 QZAMTC
132 132 A QZCHK1
133 133 A QZCHK2
134 134 A QZCHK3
135 135 A QZCHK4
136 136 A QZCHK5
137 137 A QZCHK6
138 138 A QZCHK7
139 139 A QZCHK8
140 140 A QZCHK9
141 141 A QZCHKA
142 142 A QZCHKB
143 143 A QZCHKC
144 153 A QZACTI
154 159 S 0 QZPROD
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.