program-id. Program1 as "assignment_7-Program1". environment division. input-output section. file-control. select payroll-master assign to "C:\temp\payroll-master.txt" organization is line sequential. select payroll-report assign to "C:\temp\payroll-report.txt" organization is line sequential. data division. fd payroll-master. 01 payroll-file. 05 emp-no pic x(5). 05 emp-name pic x(20). 05 pic x(4). 05 annual-salary pic 9(6). 05 pic x(13). 05 union-dues pic 999V99. 05 insurance pic 999V99. 05 pic x(22). fd payroll-report. 01 payroll-record. 05 pic x(3). 05 emp-no-out pic x(5). 05 pic x(2). 05 emp-name-out pic x(20). 05 pic x(2). 05 old-salary pic zzzzz9. 05 pic xx. 05 new-salary pic zzzzz9. 05 pic x(2). 05 old-dues pic zzz.99. 05 pic x. 05 new-dues pic zzzz.99. 05 pic x(2). 05 old-insurance pic zzz.99. 05 pic x. 05 new-insurance pic zzzz.99. 05 pic x(2). working-storage section. 01 page-heading. 05 pic x(30) value spaces. 05 payroll-report-title pic x(15) value "PAYROLL REPORT". 05 pic x(21) value spaces. 05 the-date. 10 current-day pic xx/. 10 current-month pic xx/. 10 current-year pic xxxx. 01 temp-date. 05 temp-year pic xxxx. 05 temp-month pic xx. 05 temp-day pic xx. 01 field-titles-1. 05 pic x value spaces. 05 pic x(8) value "EMPLOYEE". 05 pic x(9) value spaces. 05 pic x(4) value "NAME". 05 pic x(11) value spaces. 05 pic x(3) value "OLD". 05 pic x(5) value spaces. 05 pic x(3) value "NEW". 05 pic x(5) value spaces. 05 pic x(3) value "OLD". 05 pic x(5) value spaces. 05 pic x(3) value "NEW". 05 pic x(5) value spaces. 05 pic x(3) value "OLD". 05 pic x(5) value spaces. 05 pic x(3) value "NEW". 05 pic x(4) value spaces. 01 field-titles-2. 05 pic x(4) values spaces. 05 pic x(3) value "NO.". 05 pic x(25) value spaces. 05 pic x(6) value "SALARY". 05 pic x(2) value spaces. 05 pic x(6) value "SALARY". 05 pic x(3) value spaces. 05 pic x(4) value "DUES". 05 pic x(4) value spaces. 05 pic x(4) value "DUES". 05 pic x(3) value spaces. 05 pic x(6) value "INSUR.". 05 pic x(2) value spaces. 05 pic x(6) value "INSUR.". 05 pic x(2) value spaces. 01 end-flag pic x(3) value "YES". procedure division. 100-main. open input payroll-master output payroll-report move function current-date to temp-date perform 150-print-heading perform until end-flag = "NO" read payroll-master at end move "NO" to end-flag not at end perform 200-calculate-increases perform 250-write-record end-read end-perform close payroll-master payroll-report goback. 150-print-heading. move temp-year to current-year move temp-month to current-month move temp-day to current-day move page-heading to payroll-record write payroll-record move field-titles-1 to payroll-record write payroll-record after advancing 1 line move field-titles-2 to payroll-record write payroll-record. 200-calculate-increases. move spaces to payroll-record compute new-salary = (annual-salary * 0.07) + annual-salary compute new-dues = (union-dues * 0.04) + union-dues compute new-insurance = (insurance * 0.03) + insurance. 250-write-record. move emp-no to emp-no-out move emp-name to emp-name-out move annual-salary to old-salary move union-dues to old-dues move insurance to old-insurance write payroll-record after advancing 1 line. end program Program1.