CSCI 465 Assignment 4

Control-Break Processing

(100 points)

Overview

In this assignment we are using control-break processing to create a multipage report.

The skippers of 8 fishing boats are competing with each other. Each boat has made a series of up to 5 trips to each of up to 6 bays to catch fish of 3 different kinds. Because of weather, labor problems and equipment failure, not every boat has visited every bay as many as 5 times, and some boats may have missed some bays entirely.

From time to time, the skippers or their employers need information about the results of these trips. They need to know:

In addition to simple numbers of kilograms of fish, we will also print the estimated dollar value. We will assume that the fishermen can sell their catch at the rate of $0.85 per kilogram of Tuna, $1.10 per kilogram of Moonfish, and $0.92 per kiogram of Scad. We need this for all the output except the fleet totals and averages.

Input File

The input file is named KC02314.SUMMER09.CSCI465.HW4. Each record contains information in this format:

     Boat Name           10 characters
     Filler               1 character
     Bay Name            10 characters
     Filler               1 character
     Trip Data
       Tuna Catch         3 digits (kilograms)
       Filler             1 character
       Moonfish Catch     3 digits (kilograms)
       Filler             1 character
       Scad Catch         3 digits (kilograms)

The data has been sorted on 2 key fields: 1st the boat and 2nd the bay.

Output

The output should have a heading including the current date in DD/MM/YYYY format. (You should obtain the date using the Accept verb.) Below the heading put a second line stating "Report prepared by" and your name. Number the pages in the report. Center the output on the page.

When you calculate and print averages, use one digit to the right of the decimal point, and round the result.

Because a control-break program can generate a great deal of output, we will print the information for more than one control break per page. After each control break, skip a line and print a line of dashes and then skip another line before continuing. Print no more than 59 lines per page (including everything). The page heading only needs to be printed once per page.

The output for a control break should be all together on one page, not split between two pages. When you print a boat summary or the fleet summary, make sure you have enough space left on the page to print it, and if you don't advance to a new page. When you start a new boat, advance to a new page.

Sample output has been posted on a web page.

Other Notes

You must write your own JCL for this assignment, using the COBOL compiler, the linkage editor, and a fetch step. Make your load library a temporary data set.

You may find it useful to examine the pseudo-code in the course Notes book, p. 48. It deals with a 3-level control-break task, but we are dealing with only 2 levels. Our COBOL textbook also discusses control-break logic, in some detail, and there is a web page on it.

You will need a number of variables to keep track of the information. This will be easier if you choose names for them carefully. You may want to group them: data about one boat, about one bay, or about the fleet as a whole.

In calculating boat totals and overall totals, using the "rolling total" method rather than the "running total" method. Read about it in our COBOL textbook: a rolling total is a sum of intermediate totals.

Print amounts of money with a floating dollar sign and commas where appropriate.

You may want to use the Print/Punch utility IEBPTPCH to print a copy of the data, but this is not required.

Use the Eject verb to paginate your program listing.