750 likes | 823 Vues
Arithmetic Verb Template. ADD. ADD. MOVE ZERO TO NO. ADD 1 TO NO. 0. 1. ADD. MOVE 10000 TO SALARY. MOVE 2000 TO OVERTIME. ADD OVERTIME TO SALARY. 10000. 2000. 12000. ADD. MOVE 10000 TO SALARY. MOVE 2000 TO OVERTIME. MOVE 1500 TO BONUS ADD OVERTIME BONUS TO SALARY. 10000. 2000.
E N D
ADD MOVE ZERO TO NO. ADD 1 TO NO . 0 1
ADD MOVE 10000 TO SALARY. MOVE 2000 TO OVERTIME. ADD OVERTIME TO SALARY 10000 2000 12000
ADD MOVE 10000 TO SALARY. MOVE 2000 TO OVERTIME. MOVE 1500 TO BONUS ADD OVERTIME BONUS TO SALARY 10000 2000 1500 13500
ADD 7000 MOVE 7000 TO EXTRA MOVE 10000 TO SALARY. MOVE 2000 TO OVERTIME. MOVE 1500 TO BONUS ADD OVERTIME BONUS TO SALARY EXTRA 10000 2000 1500 13500 10500
ADD – ON SIZE ERROR ADD OVERTIME TO SALARY ON SIZE ERROR DISPLAY “OVERFLOW” WRITE OUT-REC FROM OVERFLOW-LINE AFTER ADVANCING 1 END-ADD.
ADD - GIVING 45 MOVE 45 TO SUM. ADD 20 TO SUM GIVING RESULT. 45 65
ADD - GIVING ADD OVERTIME TO BONUS GIVING EXTRA ADD OVERTIME BONUS GIVING EXTRA 45 65 110 OVERTIME BONUS EXTRA (Edited characters)
ADD-GIVING ADD OVERTIME BONUS SALARY GIVING TOTAL INCOME. 2000 5000 10000 17000 17000 OVERTIME BONUS SALARY TOTAL INCOME (Edited PICTURE)
ADD - ROUNDED 01 TOTAL PIC 9(5). 01 INCOME PIC 9(5)V99. ADD OVERTIME BONUS SALARY GIVING TOTAL ROUNDED INCOME 2000 5000.75 10000 17001 17000.75 OVERTIME BONUS SALARY TOTAL INCOME (Edited characters)
SUBTRACT SUBTRACT WITHDRAW FROM TOTAL SUBTRACT 45 FROM TOTAL 17200 20000 2800 TOTAL TOTAL WITHDRAWAL 19955 20000 TOTAL TOTAL
SUBTRACT SUBTRACT PAY-M1 PAY-M2 FROM DEBT. 20000 1000 3000 16000 DEBT DEBT PAY-M1 PAY-M2
SUBTRACT SUBTRACT PAY-M1 PAY-M2 FROM DEBT GIVING NEW-DEBT. 20000 1000 3000 16000 DEBT PAY-M1 PAY-M2 NEW-DEBT (Edited PICTURE)
SUBTRACT – ON SIZE ERROR SUBTRACT PAY-M1 PAY-M2 FROM DEBT GIVING NEW-DEBT ON SIZE ERROR PERFORM OVERFLOW-PARA END-SUBTRACT. 20000 1000 3000 16000 DEBT PAY-M1 PAY-M2 NEW-DEBT (Edited PICTURE)
MULTIPLY MULTIPLY 0.07 BY PRICE. 10000 700 PRICE PRICE
MULTIPLY MULTIPLY GRADE BY CREDIT. 10.5 3.5 3 CREDIT GRADE CREDIT
MULTIPLY MULTIPLY QUANTITY BY PRICE-1 PRICE-2 20 5.25 7.75 105.00 155.00 QUANTITY PRICE-1 PRICE-2 PRICE-1 PRICE-2
MULTIPLY MULTIPLY GRADE BY CREDIT GIVING RESULT. 10.5 3.5 3 RESULT GRADE CREDIT MULTIPLY GRADE BY CREDIT GIVING RESULT
MULTIPLY MULTIPLY QUANTITY BY PRICE-1 PRICE-2 ROUNDED 27 7.39 7.39 199.53 200 QUANTITY PRICE-1 PRICE-2 PRICE-1 PRICE-2
DIVIDE DIVIDE QUANTITY INTO TOTAL-PRICE. 5 20 100 TOTAL-PRICE QUANTITY TOTAL-PRICE
DIVIDE 20 INTO TOTAL-PRICE DIVIDE DIVIDE 20 INTO TOTAL-PRICE. 5 100 TOTAL-PRICE TOTAL-PRICE
DIVIDE DIVIDE QUANTITY INTO TPRICE-1 TPRICE-2. 5 100 200 20 40 QUANTITY TPRICE-1 TPRICE-2 TPRICE-1 TPRICE-2
DIVIDE GIVING DIVIDE 20 INTO NUMBER GIVING RESULT DIVIDE NUMBER BY 20 GIVING RESULT 100 5 NUMBER RESULT
DIVIDE GIVING ROUNDED DIVIDE NUMBER BY N GIVING RESULT-1 RESULT-2 ROUNDED. DIVIDE N INTO NUMBER GIVING RESULT-1 RESULT-2 ROUNDED. 5 103 20.6 21 NUMBER N RESULT-1 RESULT-2
DIVIDE REMAINDER 01 N PICTURE 99. 01 M PICTURE 9. DIVIDE 5 TO 23 GIVING N REMAINDER M. 4 3 N M
DIVIDE REMAINDER 01 N PICTURE 99. 01 M PICTURE 9V9(3). DIVIDE 5.1 TO 23.5 GIVING N ROUNDED REMAINDER M. 23.5/5.1 = 4.607 5 0.007 N M
COMPUTE COMPUTE RESULT = FIRST + SECOND * THIRD / FOURTH.
COMPUTE COMPUTE RESULT1 ROUNDED RESULT2 = FIRST + SECOND * THIRD / FOURTH
Edited Pictures • ใช้สำหรับการแสดงผลทางจอภาพ หรือ เครื่องพิมพ์ • ใช้เป็น operands ในการคำนวณไม่ได้ • ใช้เป็นตัวเก็บผลของการคำนวณได้ อาทิ อยู่หลัง GIVING