Question: You will create a OpenCOBOL program that will generate a payroll report for Stomper & Wombat's Emporium. This batch program will be named lab4.cob and
You will create a OpenCOBOL program that will generate a payroll report for Stomper & Wombat's Emporium. This batch program will be named lab4.cob and the input file will be named lab4-in.dat and will be located in the same directory as the lab4 executable (so do not specify a path for the file in the Select statement).
The input file is of the "Payroll" format, which is detailed in a separate document, ThePayrollFile.pdf, which can be found in the same location as the test files for your programming assignments.
The program is to create a formatted report which will be named lab4-out.dat, and will also be located in the same directory as the lab4 executable (so do not specify a path for the file in the Select statement). At a minimum, formatting must include leading zero suppression, visible decimal point, and thousands separator. A currency symbol is optional, and if used must be floating.
The report will only contain a subset of the variables in the file. In order:
Department Number
Employee Number
Employee Name (Last Name and First Initial)
Job Title
Date of Hire
Marital Status
Number of Dependents
Insurance Coverage
o This will be a string of three characters
1st - "M" if employee has medical coverage, space if not
2nd - "D" if employee has dental coverage, space if not
3rd - "V" if employee has vision coverage, space if not
401k Withholding
Pay Code
Expected Monthly Pay
o For Salaried and Commissioned employees, this is the annual pay divided by 12, rounded
o For Hourly employees, this is the hourly rate times the expected number of hours the employee will work in a month. Use 52 as the number of weeks in a year to determine the number of weeks in a month.
Expected Monthly Commission
o Only applies to Commissioned employees. Each such employee has a commission rate that is applied to their sales amount. Expected monthly sales is $45,000.00 for each sales person
o Leave this column blank (all spaces) for employees who are not commissioned
The total for the report includes all expected pay, including the commission.
The lab zip package (lab4.zip) also contains a file named lab4-guide.dat which can be used as a guide for formatting your report. Things to note about the format of this report:
The contents of each line of the report are shown in the report guide file
The spacing between items on a line do not have to match the guide exactly
In the guide, X represents string values and 9 represents numeric values and only show field location and size, not formatting
The date and time are to be the current date and time. Only get this from the system once.
?M represents either AM or PM, as appropriate
Blank lines (such as the ones before and after the column headers) are required
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
