Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I need help writing a COBOL program! Instructions: SAMPLE OUTPUT: INPUT DATA: MARK MCGWIRE MANAGER 0000067000 WILLIAM CLINTON PROJECT LEADER0000054000 JOE JACKSON PROJECT LEADER0000120000

Hello! I need help writing a COBOL program!

Instructions:

image text in transcribed

image text in transcribed

SAMPLE OUTPUT:

image text in transcribedimage text in transcribed

INPUT DATA:

MARK MCGWIRE MANAGER 0000067000 WILLIAM CLINTON PROJECT LEADER0000054000 JOE JACKSON PROJECT LEADER0000120000 RONALD REAGAN PROJECT LEADER0000324000 JOE NAMATH CONSULTANT 0000056000 KARL MALONE MANAGER 00B0056000 ERIK KRAMER PROGRAMMER 0000076000 MARK GRACE PROGRAMMER 0000340000 MARK MATTHEWSON MANAGER 0000077000 HILLARY CLINTON PROJECT LEADER0000051000 JOE JOHNSON PROJECT LEADER0000020000 RONALD MCDONALD MANAGER 0000224000 JOE LAWRENCE CONSULTANT 00C0055000 KARL DIDRICKSON MANAGER 00B0051000 ERIK WILLIAMS PROGRAMMER 0000176000 MARK SMITH PROGRAMMER 0000040000 WILLIAM ERICKSON 0000055999 MANAGER ALBERT EINSTEIN MANAGER 0000124000 NAPOLEAN KAUFMAN RUNNING BACK 0003000000 RALPH SAMPSON PROJECT LEADER0000050000 PATRICK EWING MANAGER 0000230000 JOHN OLERUD MANAGER 0000065000 KEITH HERNANDEZ PROGRAMMER 0000076000 LAWRENCE TAYLOR PROGRAMMER 0000098000 JOE THEISMAN PROJECT LEADER0000056000 ED JONES PROJCT LEADER0000043000 ED JONES PROJECT LEADER0000043000 SYLVIA CLAMPTON MANAGER 0000430000 PATRICIA EDWARDS PROGRAMMER 0000054000 MARK JACKSON PROGRAMMER 0000032000 MARK SPITZ PROGRAMMER 0000098000 LAURA INGALLS PROJECT LEADER0000045000 ALLAN SAAF MANAGER 0000100000 WILLIAM JARGONSEN PROGRAMMER 0000043000 SAMUEL ADAMSON MANAGER 0000065000 DARVIS JOHNSON PROGRAMMER 0000098000 JIMMY JOHNSON PROGRAMMER BBBBB43000 JEFF BLAKE MANAGER 0000076000 CARL PICKENS PROJECT LEADER0000087000 LAWRENCE WELK MANAGER 0000056000

THANKS!

Note: The input file must be downloaded from the Unit content module, and there are sample output files available for viewing in the content module You need to extract payroll information from an employee file. The file contains the following information: First name, Last name, title, and gross salary. You will have three output reports for this program. The first and second output reports will contain information for only those records which have valid input information (so you will need to do some data validation). The third file is an error report which will contain only the records which have some invalid information in the input file The two possible pieces of information which could be invalid are the following: Field Valid Values MANAGER tle OGRAMMER PROJECT LEADER Must be numeric (no dollar signs, commas, etc.) Salary OUTPUT FILES Note: Each heading line has a DATE, and a TIME. Be sure to use the ACCEPT command to request these two pieces of information from the system. The actual date information displayed in the output file will depend on the day and time the program is executed. *File1: Detail report (please call this file output4_1txt) The detail report should have 10 detail lines per page, with 2 blank lines between each detail line. For the 3 numeric compensation fields, used a fixed dollar sign. Allow for the possibility of 10 numbers for each (i.e. the highest value for any of the 3 fields is 999999999). Use asterisks for any leading zeros except the very right most digit. For each valid input record, you will write out the following to the detail report: Last name, gross salary, bonus, and gross compensation. The bonus is determined as follows: mployee Title MANAGER 10% of gross salary %of % of gross s OJECT LEADER s sal OGRAMMER The gross compensation is the gross salary added to the bonus File 2: Bonus report (please call this file output4_2.txt) ****File 2: Bonus report (please call this file output4_2.txt) The bonus report file should have 20 detail lines per page, with one blank line between cach detail line. The bonus amount should allow for up to 10 possible numbers (i.c. the largest possible bonus is 9999999999). It should use a floating dollar sign, and must show at least the right most three digits of the bonus For each valid input record, you will write out the following to the bonus report: First name, last name, bonus received. There will also be a summary line with this report which will show the total accumulated bonuses for all employees. File 3: Error report (please call this file output4_3.txt** For every record that is in error, write that record out to the error report. You should write the entire contents of the record (just as they are in the input file, and also indicate which of the two fields (or both) that are in error If the salary is in error write out a S' to the output report, if the title is in error, write out a T to the output report and i both are in er or write out a B' to the output report (see the sample output for clari cation Input File (please call the input file input4.txt)******* The file layout for the input file is as follows: Field Name First Name Last Name Number of Bytes 10 bytes 15 bytes 14 bytes 10 bytes Once you have completed the program, copy the entire CSCI135 P4 yourname folder into the appropriate folder in the dropbox (H drive). Be sure to document your program liberally, according to the established documentation rules. CSCI 135 - PROGRAM 4 THE TOP 2 LINES NEED TO BE CENTERED) EMPLOYEE PAYROLL REPORT DATE: 99/99/9999 TIME: 99:99 PAGE 01 LAST NAME GROSS BONUS GROSS COMP MCGWIRE CLINTON ***4320 DETAIL RECORDS CONTINUE OUTPUT4 2.TXT SHOULD LOOK AS FOLLOWS *: CSCI 135 - PROGRAM 4 (THE TOP 2 LINES NEED TO BE CENTERED) EMPLOYEE BONUS REPORT DATE: 99/99/9999 TIME: 99:99 PAGE 01 FIRST NAME LAST NAME BONUS RECEIVED MARK MCGWIRE $5400 WILLIAM CLINTON $4320 DETAIL RECORDS CONTINUE TOTAL COMPANY BONUS: $300000 OUTPUT4 3.TXT SHOULD LOOK AS FOLLOWS *: ***OUTPUT4_3.TXT SHOULD LOOK AS FOLLOWS****: CSCI 135 PROGRAM 4 (THE TOP 4 LINES NEED TO BE CENTERED) PAYROLL ERROR REPORT DATE: 99/99/9999 TIME:99:99 RECORD IN ERROR FIELD RONALD REAGAN PROJECT LEADER000032400 JOE NAMATH CONSULTANT 0000056000 KARL MALONE MANAGER 00B0056000 ERROR RECORDS CONTINUE Note: The input file must be downloaded from the Unit content module, and there are sample output files available for viewing in the content module You need to extract payroll information from an employee file. The file contains the following information: First name, Last name, title, and gross salary. You will have three output reports for this program. The first and second output reports will contain information for only those records which have valid input information (so you will need to do some data validation). The third file is an error report which will contain only the records which have some invalid information in the input file The two possible pieces of information which could be invalid are the following: Field Valid Values MANAGER tle OGRAMMER PROJECT LEADER Must be numeric (no dollar signs, commas, etc.) Salary OUTPUT FILES Note: Each heading line has a DATE, and a TIME. Be sure to use the ACCEPT command to request these two pieces of information from the system. The actual date information displayed in the output file will depend on the day and time the program is executed. *File1: Detail report (please call this file output4_1txt) The detail report should have 10 detail lines per page, with 2 blank lines between each detail line. For the 3 numeric compensation fields, used a fixed dollar sign. Allow for the possibility of 10 numbers for each (i.e. the highest value for any of the 3 fields is 999999999). Use asterisks for any leading zeros except the very right most digit. For each valid input record, you will write out the following to the detail report: Last name, gross salary, bonus, and gross compensation. The bonus is determined as follows: mployee Title MANAGER 10% of gross salary %of % of gross s OJECT LEADER s sal OGRAMMER The gross compensation is the gross salary added to the bonus File 2: Bonus report (please call this file output4_2.txt) ****File 2: Bonus report (please call this file output4_2.txt) The bonus report file should have 20 detail lines per page, with one blank line between cach detail line. The bonus amount should allow for up to 10 possible numbers (i.c. the largest possible bonus is 9999999999). It should use a floating dollar sign, and must show at least the right most three digits of the bonus For each valid input record, you will write out the following to the bonus report: First name, last name, bonus received. There will also be a summary line with this report which will show the total accumulated bonuses for all employees. File 3: Error report (please call this file output4_3.txt** For every record that is in error, write that record out to the error report. You should write the entire contents of the record (just as they are in the input file, and also indicate which of the two fields (or both) that are in error If the salary is in error write out a S' to the output report, if the title is in error, write out a T to the output report and i both are in er or write out a B' to the output report (see the sample output for clari cation Input File (please call the input file input4.txt)******* The file layout for the input file is as follows: Field Name First Name Last Name Number of Bytes 10 bytes 15 bytes 14 bytes 10 bytes Once you have completed the program, copy the entire CSCI135 P4 yourname folder into the appropriate folder in the dropbox (H drive). Be sure to document your program liberally, according to the established documentation rules. CSCI 135 - PROGRAM 4 THE TOP 2 LINES NEED TO BE CENTERED) EMPLOYEE PAYROLL REPORT DATE: 99/99/9999 TIME: 99:99 PAGE 01 LAST NAME GROSS BONUS GROSS COMP MCGWIRE CLINTON ***4320 DETAIL RECORDS CONTINUE OUTPUT4 2.TXT SHOULD LOOK AS FOLLOWS *: CSCI 135 - PROGRAM 4 (THE TOP 2 LINES NEED TO BE CENTERED) EMPLOYEE BONUS REPORT DATE: 99/99/9999 TIME: 99:99 PAGE 01 FIRST NAME LAST NAME BONUS RECEIVED MARK MCGWIRE $5400 WILLIAM CLINTON $4320 DETAIL RECORDS CONTINUE TOTAL COMPANY BONUS: $300000 OUTPUT4 3.TXT SHOULD LOOK AS FOLLOWS *: ***OUTPUT4_3.TXT SHOULD LOOK AS FOLLOWS****: CSCI 135 PROGRAM 4 (THE TOP 4 LINES NEED TO BE CENTERED) PAYROLL ERROR REPORT DATE: 99/99/9999 TIME:99:99 RECORD IN ERROR FIELD RONALD REAGAN PROJECT LEADER000032400 JOE NAMATH CONSULTANT 0000056000 KARL MALONE MANAGER 00B0056000 ERROR RECORDS CONTINUE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial And Managerial Accounting

Authors: Charles T. Horngren, Walter T. Harrison Jr., M. Suzanne Oliver

1st Edition

0558241050, 978-0558241056

More Books

Students also viewed these Accounting questions

Question

fscanf retums a special value EOF that stands for...

Answered: 1 week ago

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago

Question

The amount of work I am asked to do is reasonable.

Answered: 1 week ago

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago