Code: |
MOVE PRINTK-HED-AMOUNT-CUR TO
SAVE-PRINTK-HED-AMOUNT-CUR PERFORM VARYING X FROM 1 BY 1 UNTIL X > 12 IF (SAVE-PRINTK-HED-AMOUNT-CUR(X:1) >= 0) ADD 1 TO Y MOVE SAVE-PRINTK-HED-AMOUNT-CUR(X:1) TO FORMAT1(Y:1) END-IF END-PERFORM MOVE FORMAT1(1:Y) TO FORMAT-N MOVE FORMAT2 TO STORE-PRINTK-HED-AMOUNT-CUR ADD STORE-PRINTK-HED-AMOUNT-CUR TO STORE-COMPANY-MATCH-CUR-PAY MOVE 0 TO Y MOVE ZEROES TO FORMAT-N MOVE SPACES TO FORMAT1 where STORE-PRINTK-HED-AMOUNT-CUR PIC 9(10)V99 VALUE ZEROES SAVE-PRINTK-HED-AMOUNT-CUR PIC X(13) 01 FORMAT1 PIC X(12) VALUE SPACES. 01 FORMAT-N PIC 9(12) VALUE ZEROES. 01 FORMAT2 REDEFINES FORMAT-N PIC 9(10)V99. |
Code: |
MOVE STORE-COMPANY-MATCH-CUR-PAY
TO TOTAL-COMPANY-MATCH-CUR-PAY MOVE TOTAL-COMPANY-MATCH-CUR-PAY TO AUDIT-COMPANY-MATCH-CUR-PAY where 05 TOTAL-COMPANY-MATCH-CUR-PAY PIC 9,999,999.99 VALUE ZEROES. |
Code: |
01 PRINTK-HED-AMOUNT-CUR PIC ZZZZZZZZZZ.99. 01 CHAR-NUM REDEFINES PRINTK-HED-AMOUNT-CUR PIC X(13). 01 W-NUM-DEC. 05 W-NUM PIC 9(10). 05 W-DEC PIC 99. 01 W-NUMBER PIC 9(10)V99. 01 W-TOTAL PIC 9(10)V99. 01 W-TOTAL-EDIT PIC 9,999,999.99. INSPECT PRINTK-HED-AMOUNT-CUR REPLACING LEADING SPACES BY '0' UNSTRING CHAR-NUM DELIMITED BY '.' INTO W-NUM, W-DEC MOVE W-NUM-DEC TO W-NUMBER COMPUTE W-TOTAL = W-TOTAL + W-NUMBER MOVE W-TOTAL TO W-TOTAL-EDIT DISPLAY W-TOTAL-EDIT |
output generated using printer-friendly topic mod. All times are GMT - 5 Hours