OVERVIEW: the fourth COBOL programming assignment involves:
1) Reading records from the sales file (CSCJEB.CSC.SALES4D)
2) Performing calculations to produce commissions and totals
3) Generating an acceptable report which includes 2 control
breaks
with sub totals on number of salespeople and
commissions.
PURPOSE:
1) Gain experience writing a program that requires control break
processing
2) Learn how to use a copy library (a file description exists in
CSCSMS.CSC.COBOL (FSALES4D).
3) Include date (use ACCEPT) -- extra 2 points for COPY REPLACING
REQUIREMENTS:
To receive full credit for this assignment, you must deliver a correct program to instructor's hands or instructor's email address before 6:15PM of the due date.
(2 POINT BONUS if the completed assignment is received before midnight Sunday prior to the due date)
1) A listing of the JCL and COBOL programs.
2) A correct report with proper totals
NARRATIVE:
The company, SAMSTATE INSURANCE, has sales personnel that sell whole life and term life insurance policies. Whole life policies generate a 1% commission and the term policies generate a 0.01% commission. Hence, on a $300,000 whole life insurance policy, commission is $3,000, and on a $300,000 term policy the Commission would be $30. The salespeople work in district offices and more than one district office is run by a branch office. By examining monthly sales for each salesperson, the company wants to know how much commission each person receives and how many salespeople and commissions are paid for each district within each branch. Also needed is one grand total with total number of salespeople and total commissions. Whole life and term policies are only written for 1 million, 500,000, 300,000, 200,000 and 100,000 amounts. Special codes are used in each record to avoid massive data entry problems. For example:
5W03 = five whole life policies for 300,000 dollars each were sold
3T10 = three term policies for $1 million each were sold.
INPUT RECORD DESCRIPTION: (70 columns, block size = 700)
Use CSCSMS.CSC. COBOL (FSALES4D) for copylib member
FIELD COLUMNS DATA CLASS
Sales person number 1-5
numeric
sales person name 6-24
alphanumeric
District No.
25-26 numeric
branch number
28-29 numeric
policy number
32-35 alphanumeric
policy number
37-40 alphanumeric
policy number
42-45 alphanumeric
policy number
47-50 alphanumeric
policy number
52-55 alphanumeric
policy number
57-60 alphanumeric
policy number
62-65 alphanumeric
policy number
67-70 alphanumeric
OUTPUT RECORD DESCRIPTION: {column layout is up to programmer}
Example of input :
12345STEVE SAMUELS
15 08 1W10 5T05 2T03
38423JOEL BERNSTEIN
15 08 8T01 6T05 6W01 2W03
45940CYNDEE LLEWELLYN
21 08 2W10
55I40TIMOTHY DOODY
21 08 4T10 5T10 3T01 4T03 2W05 1W01
69404DIANE FIRESTONE
21 08 7T05 W202
Example of output:
Date of report: 02/08/1999
***********************************************************************
NUMBER NAME
DISTRICT BRANCH COMMISSION
***********************************************************************
12345 STEVE SAMUELS
15 08 $10,310
38423 JOEL BERNSTEIN
15 08 $12,380
DISTRICT 15: TOTAL SALES PEOPLE = 2 TOTAL COMMISSIONS PAID = $22,690.
45940 CYNDEE LLEWELLYN
21 08 $20,000
55I40 TIMOTHY DOODY
21 08 $11,800
69404 DIANE FIRESTONE
21 08 $4,350
DISTRICT 21: TOTAL SALES PEOPLE = 3 TOTAL COMMISSIONS PAID = $36,150
BRANCH 8: TOTAL SALES PEOPLE = 5 TOTAL COMMISSIONS PAID = $58,840
COMPANY: TOTAL SALES PEOPLE =__ TOTAL COMMISSIONS PAID = ____________
>>>>>>>> extra two points
for copy replacing <<<<<<<<<<<