In have a printer file that looks somewhat like this:
Customer-data Units01 Units02 ....... Units11
-------------------------------------------------------------
Name/address/zip/.... Count01 Count02 ....... Count11
Name/address/zip/.... Count01 Count02 ....... Count11
: : : : : : : :
Name/address/zip/.... Count01 Count02 ....... Count11
------- ------- ------- -------
Totals Total01 Total02 ....... Total11
The Units, Count and Total fields are mapped into data structures overlayed with an array definition like this:
0014.00 D UNITSDS DS
0015.00 D UNITS01
0016.00 D UNITS02
: : :
0024.00 D UNITS10
0025.00 D UNITS11
0026.00 D UNITSAR LIKE(UNITS) DIM(11)
0026.00 D OVERLAY(UNITSDS)
: D*-------------------------------------------------------
0034.00 D COUNTDS DS
0035.00 D COUNT01
0036.00 D COUNT02
: : :
0044.00 D COUNT10
0045.00 D COUNT11
0046.00 D COUNTAR LIKE(COUNT) DIM(11)
0046.00 D OVERLAY(COUNTDS)
: D*-------------------------------------------------------
0054.00 D TOTALDS DS
0055.00 D TOTAL01
0056.00 D TOTAL02
: : :
0064.00 D TOTAL10
0065.00 D TOTAL11
0066.00 D TOTALAR LIKE(TOTAL) DIM(11)
0066.00 D OVERLAY(TOTALDS)
When I process a WRITE on the details line in the printer file after some processing I get a "Decimal data error".
I was very much surprised that it appears that the arrays COUNTAR and TOTALAR have data type "Packed" although all previous defined variables COUNT, COUNTnn, TOTAL and TOTALnn are "Zoned" and the data structures COUNTDS and TOTALDS are "Char".
Packed data was mapped in the output buffer for the printer file causing the "Decimal data error".
Why are these arrays suddenly in "Packed" data format?