Assignment 6

100 points

Overview

A beginning entrepreneur named Susan Glimpshire has been trying a number of small business ventures. While she is rather creative, she is not always successful. She made money on some of them and on others she lost money (cats don't like to wear sweaters, for instance).

In this assignment, we have data about Susan's ventures. We will store the data in a table, print the table and then calculate and print some statistics about Susan's progress.

In particular, this program will make use of external subroutines, character data and packed decimal numbers.


Input

The input to the program will be a file with an unknown number of records.

Each record represents a single business venture and has the following format:

     columns         description
     -------         -----------
      1 - 30         Description (characters)
     31 - 32         blanks             
     33 - 37         Profit or Loss (5 digits zoned decimal)
     38 - 80         not used (blanks)

A positive value indicates that Susan made a profit, and a negative value indicates that Susan lost money.

Use the following JCL statement to specify the input file:

//FT05F001  DD  DSN=KC02314.SPRING20.CSCI360.HW6DATA,DISP=SHR


Processing Requirements

The main program will carry out the following steps:

For each subroutine, you can use the same parameter list:


What statistics do we need?

The STATs subroutine should calculate and print:


Other Notes

  1. You may assume that the table needs to hold no more than 25 values.

  2. Use this DSECT to describe a table entry:
         $ENTRY   DSECT
         $DESCR   DS    30C
         $VALUE   DS    PL3

    Put the DSECT at the top before MAIN.

  3. Write this program incrementally, one subroutine at a time. Start with BUILD. You may want to XDUMP the table to see whether BUILD is correct. After that, write and test PRINT. Once you have PRINT working, you can go on to STATS.

  4. The JCL for this assignment is the same as the JCL used in Assignments 4 and 5 except for the line given above to provide the data.

  5. All of these subroutines are external subroutines. You will need standard entry and exit linkage in the main routine and in each subroutine.

  6. You may not use XDECI or XDECO anywhere in this assignment. The numbers should all be stored in packed decimal format. You will need to decide on the lengths to use.

  7. When you print amounts of money, print a leading dollar sign, a decimal point and two digits to the right of the decimal point. If an amount of money is negative, print CR to the right of the value.


Output

Each page should have a page heading, centered. The pages should be numbered.

Column headings should be double-spaced from the page header.

PRINT should have a page heading saying something like "Susan's Business Ventures".

In the output from PRINT, the lines of customer information should be double spaced. The output from PRINT should all fit on one page.

In the output from PRINT, the summary lines should be triple-spaced from the last customer record. Double-space between summary lines.

STATS should start its output on a new page. There should be a page heading saying something like "Summary of Susan's Business Ventures".

In the output from STATS, the lines should be triple-spaced.

The output from STATS should all fit on one page.