I am trying to create a report in easytrieve. When the field, which is being totaled, is non zero the report displays the value but when the field is zero the report is printing spaces. I asked one person and he said thats how it works. Is it true, if so is there anyway I can force the program to write zero.
REPORT OUTPUT1 PRINTER OUTFILE SUMMARY SPREAD
SEQUENCE VAR1 VAR2 VAR3
CONTROL VAR1 NOPRINT VAR3 NOPRINT VAR2
TITLE 1 WS-REPORT-TITLE
HEADING 'VAR1' VAR1
HEADING 'VAR3' VAR3
HEADING 'VAR2' VAR2
HEADING 'AMOUNT' AMOUNT
LINE VAR1 VAR3 VAR2 AMOUNT
The amount variable is declared as 12 8 N 0
Please let me know, if additional informations are required.
8 N => 00000000
8 N 0 =>
(that part intentionally left blank)
Unless the cunningly-named VAR1, VAR2 and VAR3 have any decimal places (including 0) you don't need the SUM, it will happen automatically.
I never knew you could specify the HEADING like that, I've always put the name first, like in the manual. In fact, usually had them on the data-definitions, either in macros for "copybooks" (so the same field always gets the same heading in any REPORT) or for "storage" fields. Learn something new every day...