I'm appending data from 5 different selections with the same layout into one hold file. I'm getting some strange characters in my Hold File when doing the fifth one. The first 4 give a correct result. The only difference is that the fifth one has less fields so I'm defining them to be able to match others. My code:
FILEDEF ALLDATA DISK ALLDATA (APPEND
...
-----------------
-One of the 4 appends:
-----------------
TABLE FILE ACTUAMON
SUM
NET_SALES_VALUE/D18.0
CREDIT_VALUE/D18.0
COMPUTE BUDGET/D18.0 = CO_PA_SALES * (NB_WD / TOT_WD);
BY
ZPROFCTR_KEY
BY
TIMESORT
BY
TIMENAME
BY
NB_WD
BY
TOT_WD
WHERE ZPROFCTR_KEY NE '#';
ON TABLE HOLD AS ALLDATA
END
-----------------
-The fifth append:
-----------------
DEFINE FILE HLDACANN
NB_WD/F4 = 0;
TOT_WD/F4 = 0;
TIMESORT/A1 = 'Z';
TIMENAME/A20 = 'ANNUAL';
END
TABLE FILE HLDACANN
SUM
NET_SALES_VALUE/D18.0
COMPUTE CREDIT_VALUE/D18.0 = 0;
COMPUTE BUDGET/D18.0 = CO_PA_SALES;
BY
ZPROFCTR_KEY
BY
TIMESORT
BY
TIMENAME
BY
NB_WD
BY
TOT_WD
WHERE ZPROFCTR_KEY NE '#';
ON TABLE HOLD AS ALLDATA
END
----------
Result
----------
PAGE 1
ZPROFCTR_KEY TIMESORT TIMENAME NB_WD TOT_WD Sales Update %Ach Credit
�Rc� C |C 00000010 9 0 0 .00 *********************** .0 0.
C |C 0000001084 0 0 .00 *********************** .0 ***********************
��@ �A tB;ڼO1D�@0000001042 0 0 .00 1,374,389,804,928. .0 ***********************
�? �A 0000001010 0 0 ********************** 6,422,194. *********************** 0.
d�'A 0A �AI�$I� A0000001042 0 0 ********************** 378,927. *********************** 0.
0A �A 0000001031 0 **** ********************** 815,979. *********************** 201,326,625.
0000001010 Q QUARTER-TO-D 0 0 1,374,389,804,928.00 1,451,638. 94,678,574.5 30,446,289.
Z� 0 **** ********************** 63,869. *********************** 1,374,389,804,928.
ثA �? �A �0 ��@0000001034 0 **** .00 46,907. .0 201,326,624.
���?A �A tB&C��]~A0000001011 0 **** **********************
...
When I remove the fifth append, the data is looking good.
Any idea???