CSC 203-701/702 COBOL ASSIGNMENT #5
Due Monday,
November 12, 2001GRADING: This program will be graded on a
50 point basis. A 10% penalty per week applies if you miss the due date. The
assignments will not be accepted after November 19, 2001, which is the date of
the final exam and our last class session.
OBJECTIVES: The fifth COBOL programming assignment
involves:
PURPOSE: To gain experience writing COBOL programs involving table handling techniques.
REQUIREMENTS: To receive full credit for this assignment, you must submit, ON TIME:
PROGRAM 5 NARRATIVE:
The CEO of a small insurance company consisting of 24 agents is interested
in obtaining a report detailing premiums earned for each record read showing an
employee number and name, a quarter sold, a region name, the number of policies
sold, and total amount of premiums.
PROGRAM 5 INPUT SPECIFICATIONS:
for NAMES5.TXT (record length = 25)
FIELD | COLUMNS | DATA CLASS |
agent number | 1-5 | numeric |
agent name | 6-25 | alphanumeric |
for SALES5.TXT (record length = 28)
FIELD | COLUMNS | DATA CLASS |
agent number | 1-5 | numeric |
quarter sold | 7 | numeric |
region where sold | 9-10 | numeric |
number of ins. codes | 12 | numeric |
insurance codes | 14-28 | numeric (each insurance code consists of a 3-digit number representing a sex, type-policy, risk-factor) |
Use COPY, in Working Storage, for VALUES5.TXT, the insurance table, to bring it into your program.
for REGION5.TXT (record length = 23)
FIELD | COLUMNS | DATA CLASS |
Region number | 1-2 | numeric |
Region name | 3-23 | alphanumeric |
PROGRAM 5 OUTPUT SPECIFICATIONS:
SALES REPORT
AGENT NO AGENT NAME REGION QUARTER # POLICIES PREMIUM
12345
BILLIE HOLIDAY
CHICAGO
1
4
$640.00
23456
TONY BENNETT
ATLANTA
3
5
$1,525.00
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
etc.
TOTALS
9
$2,165.00