lab 6.docx
The emphasis in this lab is the use of structure charts to assist in designing your programs and further use of PERFORM (with PERFORMS within PERFORMED paragraphs). When reading through the requirements and planning functionality, be careful in decomposing tasks so that functionality is implemented in the most appropriate paragraph.
This program is to print out a report of employees and salary increases. Download the sample output and data file.
Input
The input data file has the following layout:
EMPLOYEE NAME EDUCATION YEARS PRESENT
NUMBER CODE SERVICE SALARY
1-3 4 - 18 19 20-21 22-28
004 Archer Bill N 01 5000.00
185 Donneman Tom G 06 12000.00
Note: the EDUCATION CODE will contain either a ‘G’ for employees who are graduates or ‘N’ for non-graduates. These are the only two values that will appear; there will NOT be erroneous data.
Requirements
1. The program is to classify all employees, both GRADS and NON GRADS, as follows. These classifications (i.e. SEN PROG, etc.) along with associated values are to be set up as constants in WORKING-STORAGE.
a. A graduate employed more than 15 years is an analyst (print out ANALYST).
b. A graduate employed 7 to 15 years inclusive is a Senior Programmer (print out SEN PROG).
c. A non-graduate employed more than 10 years is a programmer (PROG).
d. A graduate employed less than 7 years but more than 2 is also a programmer (PROG).
e. A non-graduate employed 10 years or less but more than 4 years is a junior programmer (JR PROG).
f. A non-graduate employed 4 years or less is unclassified. (Leave blank, use Move Spaces, NOT a WS literal).
g. A graduate employed 2 years or less is unclassified (leave blank, use Move Spaces).
DESIGN REQUIREMENT: Break your solution down into at least 5 tasks (paragraphs), one for each classification, to process the requirements for the classification, to be used by both the GRADUATES/NON GRADUATES depending on their years of service. Then, within the main IF statements, just PERFORM those paragraphs as required. You may also want to consider having one paragraph each for Grads and Non-grads themselves.
2. The program is to calculate pay increases as follows:
Analyst 11.9%
Senior Prog 9.3% These pay increase % are
Programmer 6.7% to set up in
Junior Prog 3.7% WORKING-STORAGE as
Unclassified 0% program constants.
3. The program is to calculate and print out the average increase (2 places of decimal) for each of the 4 classifications. Print with SHORT TITLES on 1 or 2 lines. Use Z and comma editing.
4. The output report is to have the main heading EMPLOYEE SALARY REPORT and suitable column headings; line spacing is your choice. My attached sample shown is just a model, and you do not have to follow it exactly.
5. For each employee print the employee number, name, years, classification, (i. ...
lab 6.docxThe emphasis in this lab is the use of struc.docx
1. lab 6.docx
The emphasis in this lab is the use of structure charts to assist
in designing your programs and further use of PERFORM (with
PERFORMS within PERFORMED paragraphs). When reading
through the requirements and planning functionality, be careful
in decomposing tasks so that functionality is implemented in the
most appropriate paragraph.
This program is to print out a report of employees and salary
increases. Download the sample output and data file.
Input
The input data file has the following layout:
EMPLOYEE NAME EDUCATION YEARS
PRESENT
NUMBER CODE SERVICE SALARY
1-3 4 - 18 19 20-21 22-28
004 Archer Bill N 01 5000.00
185 Donneman Tom G 06 12000.00
Note: the EDUCATION CODE will contain either a ‘G’ for
employees who are graduates or ‘N’ for non-graduates. These
are the only two values that will appear; there will NOT be
2. erroneous data.
Requirements
1. The program is to classify all employees, both GRADS and
NON GRADS, as follows. These classifications (i.e. SEN
PROG, etc.) along with associated values are to be set up as
constants in WORKING-STORAGE.
a. A graduate employed more than 15 years is an analyst (print
out ANALYST).
b. A graduate employed 7 to 15 years inclusive is a Senior
Programmer (print out SEN PROG).
c. A non-graduate employed more than 10 years is a
programmer (PROG).
d. A graduate employed less than 7 years but more than 2 is also
a programmer (PROG).
e. A non-graduate employed 10 years or less but more than 4
years is a junior programmer (JR PROG).
f. A non-graduate employed 4 years or less is unclassified.
(Leave blank, use Move Spaces, NOT a WS literal).
g. A graduate employed 2 years or less is unclassified (leave
blank, use Move Spaces).
DESIGN REQUIREMENT: Break your solution down into at
least 5 tasks (paragraphs), one for each classification, to
process the requirements for the classification, to be used by
both the GRADUATES/NON GRADUATES depending on their
years of service. Then, within the main IF statements, just
PERFORM those paragraphs as required. You may also want to
3. consider having one paragraph each for Grads and Non-grads
themselves.
2. The program is to calculate pay increases as follows:
Analyst 11.9%
Senior Prog 9.3% These pay increase % are
Programmer 6.7% to set up in
Junior Prog 3.7% WORKING-STORAGE as
Unclassified 0% program constants.
3. The program is to calculate and print out the average increase
(2 places of decimal) for each of the 4 classifications. Print
with SHORT TITLES on 1 or 2 lines. Use Z and comma editing.
4. The output report is to have the main heading EMPLOYEE
SALARY REPORT and suitable column headings; line spacing
is your choice. My attached sample shown is just a model, and
you do not have to follow it exactly.
5. For each employee print the employee number, name, years,
classification, (i.e. SEN PROG, etc.), present salary, % increase
with a % sign, pay increase and new salary.
6. Print 15 lines on each page, and include a PAGE NUMBER
as shown on the sample output.
7. Print the pay increase amount with a floating $, a comma and
a + sign on the right hand end, i.e. $2,610.01+.
8. For UNCLASSIFIED leave the % increase blank (spaces) and
print the pay increase amount as $0.00+. Don’t print the %, of
course.
9. Print the NEW SALARY with a fixed $, a comma and Z's, i.e.
$ 27,251.17.
4. 10. Print the PRESENT SALARY with Z's, and a comma. No $.
11. You MUST create your OUTPUT DETAIL LINE in
WORKING-STORAGE, NOT within the FD record layout. You
will be using FROM consistently in all WRITE statements.
SUBMISSION:
A zip or 7z archive containing your entire visual studio project
and .sln file.
A copy of your structure chart
LAB 8.docx
LAB 8
This lab is another extension of Lab 6. This time, you will not
need to make major alterations to fulfil the requirements.
Download the new data
Sample output has not been provided for this lab as there have
been no additions to the layout from lab 6.
1. Closely inspect the data file, the layout is the same BUT the
ordering of the records has changed. Hint: look at education
code!
2. Continue to display employee class counts at the bottom of
each page.
3. Alter your program so that is has 2 output files instead of 1.
This is a significant alteration BUT not nearly as significant as
5. in lab #7. You can use the ordering of the data to your
advantage!
a. One output file will show all the Grads (‘G’), the other will
show all Non-grads (‘N’).
b. Remember that you will have to add a SELECT statement, an
FD and 01, OPEN’s and CLOSE’s as well as the logic to write
out the records. If you designed Lab #6 as recommended with
paragraphs for N and G you should put the actual WRITE logic
in the G and N paragraphs themselves. If you did NOT have G
and N paragraphs you may choose to re-design a bit.
c. In this version, you will be able to produce each report in
entirety BEFORE moving on to the next. Therefore, you are
required to use the same temporary variables for line / page
counting and report totals (e.g. there should only be one
variable for line counting, one variable for keeping track of the
accumulated salaries for averages etc.). Again, think about how
the ordering of the data can be exploited to achieve this.
i. The only variables that need to be different are the output
variables for the report heading, page counts and report totals.
d. Pay extra attention to initialization / re-initialization of
variables for producing each report. You will need to have
slightly
4. Totals and average salaries for each employee class at the
end of the report should now be independent for grads and non-
grads. In other words, averages should reflect only the
employee that appear on each report. It is only necessary to
print out the averages for that are applicable to the particular
report. For example, the Non-Grad report will only show ‘Prog’
and ‘Jr Prog’ since all N’s are one of those categories.
6. HAND IN:
· A ZIP or 7z archive containing your ENTIRE VS2015 Native
Cobol Console Project
lab6.dat
030ALLDREN RUTH G212020000
185DONNEMAN THOMASG060423009
004ACHER WILLIAM N010726005
325HATFIELD MARK G011122002
730REEDE OWEN G090555010
111CARTOLER VIOLETG020998007
590NEIL CLARENCE N070065009
801SCHEIBER HARRY N011000000
956WANGLEY THEO N010999991
999BAKER RON G033000014
181DELBERT EDWARD G120659013
311GROLER GRACE N230643020
318HANEY CAROL G095000014
7. 487KING MILDRED N180919963
834TRAWLEY HARRIS N057326005
027ALHOUER ELAINE G012573002
171COSTA NAN N150356005
317HANBEE ALETA G035000003
739RIDEL ROBERT N050194008
806STOCKTON NORMANG062507007
122CENNA DICK N035777004
207EBERHARDT RON G054007009
308GLEASON JAMES G015000003
568LYNNF GERALD N094487013
909UDSON DORIS N014499003
100BATES TONY N081066020
179DAMSON ERIC N032502018
292EVERLEY DONNA G032000017
409ICK MICK G259999999
607ODELLE NICK G102507018
825TILLMAN DON N120444019
8. 214EDMONSON RICK N021000000
310GORMALLY MARIE N033022006
332HELD ANNA G024000002
689OWNEY REED N043174603
802SHEA MICHAEL G062033008
102BELLSLEY ART G083000009
282ESTABAN JUAN G194055000
322HARLETON JEAN N070899012
505LAMBERT JERRY G014001004
921ULL GEORGE N182298851
105BOYLE RALPH N088044014
215EDSON WILBUR G067050008
315HALE ALAN N124000016
lab6output.txt
LAB 6 141017 13554412
EMPLOYEE SALARY REPORT
PAGE 1
9. EMP EMP PRESENT INCREASE PAY
NEW
NUM NAME YEARS POSITION SALARY %
INCREASE SALARY
030 ALLDREN RUTH 21 ANALYST 20,200.00 11.9%
$2,403.80+ $ 22,603.80
185 DONNEMAN THOMAS 6 PROG 4,230.09 6.7%
$283.42+ $ 4,513.51
004 ACHER WILLIAM 1 7,260.05 $0.00+
$ 7,260.05
325 HATFIELD MARK 1 11,220.02 $0.00+
$ 11,220.02
730 REEDE OWEN 9 SEN PROG 5,550.10 9.3%
$516.16+ $ 6,066.26
111 CARTOLER VIOLET 2 9,980.07
$0.00+ $ 9,980.07
10. 590 NEIL CLARENCE 7 JR PROG 650.09 3.7%
$24.05+ $ 674.14
801 SCHEIBER HARRY 1 10,000.00 $0.00+
$ 10,000.00
956 WANGLEY THEO 1 9,999.91 $0.00+
$ 9,999.91
------------------- more output lines here ------------------
215 EDSON WILBUR 6 PROG 70,500.08 6.7%
$4,723.51+ $ 75,223.59
315 HALE ALAN 12 PROG 40,000.16 6.7%
$2,680.01+ $ 42,680.17
EMPLOYEE CLASS: Analyst Sen Prog Prog Jr Prog
Unclassified
# ON THIS PAGE: 2 1 3 1 5
11. EMPLOYEE SALARY REPORT
PAGE 2
EMP EMP PRESENT INCREASE PAY
NEW
NUM NAME YEARS POSITION SALARY %
INCREASE SALARY
------------------- more pages of output here ------------------
AVERAGE INCREASES: ANALYST= 99,999.99 SEN
PROG= 99,999.99
PROG= 99,999.99 JR PROG= 99,999.99
lab8.dat
030ALLDREN RUTH G212020000
185DONNEMAN THOMASG060423009
325HATFIELD MARK G011122002
730REEDE OWEN G090555010
111CARTOLER VIOLETG020998007
12. 999BAKER RON G033000014
181DELBERT EDWARD G120659013
318HANEY CAROL G095000014
027ALHOUER ELAINE G012573002
317HANBEE ALETA G035000003
806STOCKTON NORMANG062507007
207EBERHARDT RON G054007009
308GLEASON JAMES G015000003
292EVERLEY DONNA G032000017
409ICK MICK G259999999
607ODELLE NICK G102507018
332HELD ANNA G024000002
802SHEA MICHAEL G062033008
102BELLSLEY ART G083000009
282ESTABAN JUAN G194055000
505LAMBERT JERRY G014001004
215EDSON WILBUR G067050008
004ACHER WILLIAM N010726005
13. 590NEIL CLARENCE N070065009
801SCHEIBER HARRY N011000000
956WANGLEY THEO N010999991
311GROLER GRACE N230643020
487KING MILDRED N180919963
834TRAWLEY HARRIS N057326005
171COSTA NAN N150356005
739RIDEL ROBERT N050194008
122CENNA DICK N035777004
568LYNNF GERALD N094487013
909UDSON DORIS N014499003
100BATES TONY N081066020
179DAMSON ERIC N032502018
825TILLMAN DON N120444019
214EDMONSON RICK N021000000
310GORMALLY MARIE N033022006
689OWNEY REED N043174603
322HARLETON JEAN N070899012