View the step-by-step solution to:

Question

PLEASE HELP COMPLETE COBOL PROGRAM


IDENTIFICATION DIVISION.

PROGRAM-ID.

HW05FL.

DATA DIVISION.

WORKING-STORAGE SECTION.

01 EMPLOYEE-RECORD-IN.

   05 EMP-PAY-DATE-IN.

      10 EMP-PAY-YY         PIC X(02).

      10 EMP-PAY-MM         PIC X(02).

      10 EMP-PAY-DD         PIC X(02).

   05 EMP-NUMBER            PIC X(03).

   05 EMP-NAME.

      10 EMP-LAST-NAME      PIC X(15).

      10 EMP-FIRST-NAME     PIC X(10).

   05 HOURS-WORKED          PIC 99V99.

   05 PAY-RATE              PIC 99V99.

   05 EMP-PAY-TYPE          PIC X.

      88 HOURLY-PAY                   VALUE 'H'.

      88 SALARY-PAY                   VALUE 'S'.

   05 EMP-POSITION          PIC X.

      88 PROGRAMMER                   VALUE 'P'.

      88 ACCOUNTANT                   VALUE 'A'.

      88 MANAGER                      VALUE 'M'.

      88 INTERN                       VALUE 'I'.

      88 TESTER                       VALUE 'T'.

   05 EMP-GROSS-OUT         PIC 9(04)V99.

   05 EMP-OVERTIME-HOURS-OUT PIC 9(02).

   05 EMP-OVERTIME-OUT      PIC 9(04)V99.

   05 EMP-TAXES-OUT         PIC 9(04)V99.

   05 EMP-NET-OUT           PIC 9(04)V99.

   05 FILLER                PIC X(10). 


01 EMP-TAX-RATE             PIC V99.


01 EMP-POSITION-TITLE       PIC X(18).


01 EMPLOYEE-PAY-TOTALS.      

   05 EMP-GROSS-PAY         PIC 9(04)V99.

   05 EMP-NET-PAY           PIC 9(04)V99.

   05 EMP-TAXES             PIC 9(04)V99.

   05 EMP-OVERTIME-HOURS    PIC 9(02)V99.

   05 EMP-OVERTIME-PAY      PIC 9(03)V99.


01 PROGRAM-TOTALS.   

   05 PROGRAM-GROSS-PAY     PIC 9(04)V99.

   05 PROGRAM-NET-PAY       PIC 9(04)V99.

   05 PROGRAM-TAXES         PIC 9(04)V99.

   05 PROGRAM-RECORD-COUNT  PIC 9(01).

   05 PROGRAM-HOURS-WORKED  PIC 9(04)V99.

   05 PROGRAM-AVERAGE-GROSS PIC 9(04)V99.

   05 PROGRAM-AVERAGE-NET   PIC 9(04)V99.

   05 PROGRAM-OVERTIME-HOURS PIC 9(02)V99.

   05 PROGRAM-OVERTIME-PAY  PIC 9(03)V99.


01 WS-DATE-IN                PIC 9(08).


01 WS-POSITIONS.

   05 WS-PROGRAMMER.

      10 WS-PROGRAMMER-CODE  PIC X(01)   VALUE 'P'.

      10 WS-PROGRAMMER-TITLE PIC X(18)   VALUE 'PROGRAMMER'.

      10 WS-PROGRAMMER-RATE  PIC 9(02)V99 VALUE 65.00.

   05 WS-ACCOUNTANT.

      10 WS-ACCOUNTANT-CODE  PIC X(01)   VALUE 'A'.

      10 WS-ACCOUNTANT-TITLE PIC X(18)   VALUE 'ACCOUNTANT'.

      10 WS-ACCOUNTANT-RATE  PIC 9(02)V99 VALUE 58.00.

   05 WS-MANAGER.

      10 WS-MANAGER-CODE     PIC X(01)   VALUE 'M'.

      10 WS-MANAGER-TITLE    PIC X(18)   VALUE 'MANAGER'.

      10 WS-MANAGER-RATE     PIC 9(02)V99 VALUE 62.00.

   05 WS-INTERN.

      10 WS-INTERN-CODE      PIC X(01)   VALUE 'I'.

      10 WS-INTERN-TITLE     PIC X(18)   VALUE 'INTERN'.

      10 WS-INTERN-RATE      PIC 9(02)V99 VALUE 22.00.

   05 WS-TESTER.

      10 WS-TESTER-CODE      PIC X(01)   VALUE 'T'.

      10 WS-TESTER-TITLE     PIC X(18)   VALUE 'TESTER'.

      10 WS-TESTER-RATE      PIC 9(02)V99 VALUE 22.00.  


PROCEDURE DIVISION.

   DISPLAY 'PAYROLL HW05FL FOR FN LN'.

*Accept, Format and Display Date here:


   DISPLAY WS-POSITIONS.


   DISPLAY '--'.

   MOVE .32 TO EMP-TAX-RATE.


   ACCEPT EMPLOYEE-RECORD-IN.

*Update the record count and DISPLAY Record #1 here:


*Insert the EVALUATE for the EMP-POSITION here to determine pay rate & title: 



*Put the Pay Calculations here, using the PAY-RATE determined by the EVALUATE



*Insert the Code to Add to PROGRAM-**** totals fields here:



*Insert the Output DISPLAYS here:


   DISPLAY 'PAY DATE    : '

   DISPLAY 'EMPLOYEE NAME: '

   DISPLAY '   NUMBER  : '

   DISPLAY '   HOURS   : '

   DISPLAY '   PAY RATE : '

   DISPLAY '   POSITION : '    

   DISPLAY '   TITLE   : '

   DISPLAY '   PAY TYPE : '

   DISPLAY '   GROSS PAY: '

   DISPLAY '   OT PAY  : '

   DISPLAY '   OT HOURS : '

   DISPLAY '   TAXES   : '  EMP-TAXES.

   DISPLAY '   NET PAY : '  EMP-NET-PAY.

   DISPLAY '--'.


   ACCEPT EMPLOYEE-RECORD-IN.


*Repeat here the Logic used for Record #1 here, for Record #2.




*At the end of Record #2 processing, Calculate the aveages, and DISPLAY file totals.



   DISPLAY 'FILE TOTALS:'.

   DISPLAY '   RECORDS : ' PROGRAM-RECORD-COUNT.

   DISPLAY '   HOURS   : ' PROGRAM-HOURS-WORKED.

   DISPLAY '   GROSS   : ' PROGRAM-GROSS-PAY.

   DISPLAY '   TAXES   : ' PROGRAM-TAXES.

   DISPLAY '   NET     : ' PROGRAM-NET-PAY.

   DISPLAY '   OT HOURS : ' PROGRAM-OVERTIME-HOURS.

   DISPLAY '   OT PAY  : ' PROGRAM-OVERTIME-PAY.

   DISPLAY 'AVERAGE GROSS: ' PROGRAM-AVERAGE-GROSS.

   DISPLAY ' AVERAGE NET: ' PROGRAM-AVERAGE-NET.


   DISPLAY '--'.


   DISPLAY 'EXTRA CREDIT:'


   DISPLAY ' -Right Justify Align Decimal Places in Display + 5%'.

   DISPLAY ' -Update the PAY-RATE on the Input File and DISPLAY it as'

           '  as an output record. '

   DISPLAY '--'.


   DISPLAY 'END OF PROGRAM FOR FIRSTNAME LASTNAME'.

   STOP RUN.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes