CSC 203-701/702  COBOL ASSIGNMENT #3

Due Monday, October 15, 2001

GRADING:  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 October 29, 2001.

OVERVIEW: The third COBOL programming assignment involves:
  
1) Reading input records from a book inventory file (BADBOOK3).
  
     [GOODBOO3 is a practice set with only good records]
  
2) Validating each field within the inventory record for appropriate data class
  
     (i.e., numeric and/or range errors)
    3) Generating an Error-Report (Output File #1) containing a listing of all invalid
        inventory records plus appropriate error messages and statistics- include total
        number of erroneous records plus percentage "bad" records.
  
4) Generating an Accepted-Records Report (Output File #2) containing
        a) appropriate heading lines
        b) a listing of all valid inventory records [edited]
        c) final report line(s) listing the totals for number of books, total inventory amount.

PURPOSE:
    1) To gain experience writing data validation routines in COBOL (one of the
most
         important aspects of any business data processing system!)
  
2) To become familiar with the use of multiple output (report) files.

REQUIREMENTS: - To receive full credit for this assignment, you must submit on time:
    1) A listing of your COBOL program
    2) A correct Error-Report
    3) A correct Inventory-Report

NARRATIVE: Sammy Publications is having a problem with its newly computerized inventory system. The inventory system, a collection of computer programs written in COBOL, has failed to execute properly the past two times it has been run. Consequently, the proper inventory report has failed to materialized causing the CEO to become extremely angry. The Manager of Data Processing believes that bad data is being entered somewhere and that he must produce a proper validation program & you get the assignment. The inventory report must be produced soon and an error report must also be included.

INPUT RECORD DESCRIPTION (GOODBOO3.txt and BADBOOK3.txt):

FIELD COLUMNS DATA CLASS
Book number 1-6 numeric
Book name 7-30 alphanumeric
Wholesale price 31-34 numeric (assumed decimal)
Retail price 36-39 numeric (assumed decimal) and must be greater than wholesale
Quantity 41-44 numeric
Royalty percent 51-52 numeric (must be less than 16%)


OUTPUT RECORD DESCRIPTIONS
:
[for error report]
  
                                     SAMMY PUBLISHING ERROR REPORT
-------------------------------------------------------------------------------------------------------------------------
BOOK         BOOK            RETAIL   WHLS    QUANTITY   ROYALTY    NUMBER
NUMBER   NAME             PRICE    PRICE    ON HAND   PERCENT   OF ERRORS
-------------------------------------------------------------------------------------------------------------------------

23123B     DOGONEIT      1000      8000         HS43                 18                3
NOT NUM                                                          NOT NUM      OVER 16

492032     VAX COBOL    0900      1200         0300                  15                1
                                             WHLS > RETAIL

etc.....................................................................

TOTAL ERRONEOUS FIELDS =
TOTAL ERRONEOUS RECORDS =
PERCENTAGE OF BAD RECORDS =

[for inventory report]
  
                                    SAMMY PUBLISHING INVENTORY REPORT
------------------------------------------------------------------------------------------------------------------------
BOOK       BOOK            RETAIL   WHLS   QTY ON  INVNTRY   ROYALTY     PROFIT
NUMBER NAME             PRICE    PRICE    HAND    AMOUNT  PERCENT    /BOOK
------------------------------------------------------------------------------------------------------------------------

12412      JACK N JILL   $12.00     $9.00      100       $1200.00       10%          $2.10
31422      PROGRAM     $14.50   $10.50        10          $145.00       15%          $2.42

etc...................................................................

TOTAL QUANTITY ON HAND =
TOTAL INVENTORY =

COMPUTATIONS:
    Inventory Amount = (quantity on hand) times (retail price)
  
Net Profit = Retail Price - Wholesale Price - (Wholesale Price * Royalty) Per Book