I could see a S0C7 if you changed WS-DOLLARS, but not if you change WS-TEMP-AMOUNT (which is what I suggested you change). The UNSTRING command doesn't really make sense the way you've used it -- it is rare for input files not to be defined with fixed formats, so UNSTRING would not be needed to manipulate the data. Based on what you've got, I would try
01 WS-DOLLARS PIC S9(07).
01 WS-DOLLARS-CHAR PIC X(07).
MOVE FUNCTION NUMVAL (WS-DOLLARS-CHAR) TO WS-DOLLARS.
and leave the rest of the code as is.