000010 IDENTIFICATION DIVISION. 000020 PROGRAM-ID. INTERACT. 000030 AUTHOR. DAVID VOORHEES. 000040* 000050*This program will prompt the user for an Employee name and salary. 000060*It will then display the Employee's new salary after applying a 000070*ten percent raise. 000080*The user is then prompted to continue or end this program. 000090* 000100 ENVIRONMENT DIVISION. 000110 000120 DATA DIVISION. 000130 000140 WORKING-STORAGE SECTION. 000150 01 WS-FIELDS. 000160 05 MORE-DATA PIC X. 000170 05 EMPL-NAME PIC X(15). 000180 05 EMPL-SALARY PIC 9(9)V99. 000190 05 EMPL-RAISE PIC 9(1)V99 VALUE 0.10. 000200 05 NEW-SALARY PIC 9(9)V99. 000210 05 RAISE-AMOUNT PIC 9(9)V99. 000220 05 TOTAL-RAISE-AMOUNT PIC 9(9)V99 VALUE ZERO. 000230 05 DISPLAY-DOLLAR-AMOUNT PIC $ZZZ,ZZZ,ZZ9.99. 000240 000250 PROCEDURE DIVISION. 000260 000270 0000-MAIN-MODULE. 000280 000290 PERFORM 0900-INITIALIZE. 000300 PERFORM 0100-PROCESS-USER-DATA 000310 UNTIL MORE-DATA = "N". 000320 PERFORM 0950-TERMINATE. 000330 STOP RUN. 000340 000350 0100-PROCESS-USER-DATA. 000360 000370 PERFORM 0110-GET-USER-DATA. 000380 000390* Calculate and display new salary after raise is applied 000400 COMPUTE RAISE-AMOUNT = EMPL-SALARY * EMPL-RAISE. 000410 MOVE RAISE-AMOUNT TO DISPLAY-DOLLAR-AMOUNT. 000420 DISPLAY 'Employee''s ' EMPL-NAME ' raise is ' DISPLAY-DOLLAR-AMOUNT WITH NO ADVANCING. 000430 ADD RAISE-AMOUNT TO EMPL-SALARY GIVING NEW-SALARY. 000440 MOVE NEW-SALARY TO DISPLAY-DOLLAR-AMOUNT. 000450 DISPLAY ' and new salary is ' DISPLAY-DOLLAR-AMOUNT. 000460 000470* Accumulate the total raise amounts 000480 ADD RAISE-AMOUNT TO TOTAL-RAISE-AMOUNT. 000490 000500* Ask user if they want to continue 000510 PERFORM 0120-CONTINUE. 000520 000530 0110-GET-USER-DATA. 000540 000550 DISPLAY 'Please enter an employee name: ' WITH NO ADVANCING. 000560 ACCEPT EMPL-NAME. 000570 000580 DISPLAY 'Please enter the salary for ' EMPL-NAME ': ' WITH NO ADVANCING. 000590 ACCEPT EMPL-SALARY. 000600 000610 0120-CONTINUE. 000620 000630 DISPLAY 'Do you want to continue? (Y/N) ' WITH NO ADVANCING. 000640 ACCEPT MORE-DATA. 000650 000660 0900-INITIALIZE. 000670 000680* Indicate that there are more data to enter 000690 MOVE "Y" TO MORE-DATA. 000700 000710 DISPLAY 'This program will prompt for an employee name and salary.' 000720 DISPLAY 'It will then calculate a 10% raise and display the new salary amount for the employee.' 000730 DISPLAY 'IMPORTANT:'. 000740 DISPLAY 'You must enter at least 15 characters for the employee name.' 000750 DISPLAY ' '. 000760 000770 0950-TERMINATE. 000780 000790* Display total raise amounts. 000800 MOVE TOTAL-RAISE-AMOUNT TO DISPLAY-DOLLAR-AMOUNT. 000810 DISPLAY 'The total amount of raises given is ' DISPLAY-DOLLAR-AMOUNT. 000820 000830* Display message to user 000840 DISPLAY 'End of Program'.