Joined: 06 Jun 2008 Posts: 8201 Location: Dubuque, Iowa, USA
You have a logic error. If field-temp-amt is zeroes, then it is not = spaces. If it is spaces, it is not = zeroes. So by the logic rules used by COBOL, your ELSE statement cannot ever be executed.
Furthermore, even if you fix your logic error the ELSE condition will never be executed. As a numeric edited field, field-temp-amt cannot EVER be = ' ' not can it EVER be = '0000000000000' which is what your IF statement is checking for. Your source field, filed-amt (or field-amt, whatever the true name is), may be zero if it is a numeric field -- but your numeric edited field will not ever take on that value.
Even if the report is transferred to a PC, nothing guaranties that the tab char will keep your data aligned.
Open the COBOL Language Reference book and check the "BLANK WHEN ZERO" clause, that would be better.