CCP- COBOL PROGRAM #5

OVERVIEW: the fifth COBOL programming assignment involves:

1)  Reading input records from (CSCJEB.CSC.RENTAL5D), a customer file, containing customer number and movie rental information (10 occurrences of Store No. and movie number).  The customer number will be used to retrieve the name of the customer from another file (CSCJEB.CSC.CUST5D.VS).

2)  Reading input records from a file (CSCSMS.CSC.MOVIE5D) that contain a movie number and movie name.  These records are to be loaded into a table for a binary search.

3)  Generating a report listing all the customers, customer numbers, movies rented, stores rented from, and totals on customers and movies rented.

4)  Generating a report listing the number of times movies were rented within each store including a total number of times each movie was rented.

PURPOSE: to gain experience writing COBOL programs involving table handling techniques, random VSAM look ups, and binary searches.

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.(Session 11)   (2 POINT BONUS if the completed assignment is received before midnight Sunday prior to the due date)

1) A listing of your COBOL program
2) Two acceptable records-include date
3) Use of a binary search (SEARCH ALL)
4) Include program documentation.
--------------------------------------------------------------------------------------------------
INPUT SPECIFICATIONS  --- CSCJEB.CSC.CUST5D.VS

FIELD            COLUMNS   DATA CLASS
Customer number   1-4      numeric
Customer name     5-24     alphanumeric

Examples of input
1234STEVE SAMUELS
1584JOEL BERNSTEIN
--------------------------------------------------------------------------------------------------
INPUT SPECIFICATIONS --- CSCJEB.CSC.RENTAL5D
FIELD            COLUMNS   DATA CLASS
Customer number  1-4       numeric
blank            5-10      alphanumeric

Store rented + blank + movie number (10 occurrences)
each occurrence has 1 byte for store number, one blank, 3 bytes for movie number, and one blank.  Hence: 60 columns needed for this (columns 11-70) store number and movie number should be numeric.

Example of input
1234 1 145 2 234 4 343 2 232 x xxx x xxx x xxx x xxx x xxx x xxx
1584 4 342 2 145 x xxx x xxx x xxx x xxx x xxx x xxx x xxx x xxx
--------------------------------------------------------------------------------------------------
INPUT SPECIFICATIONS --- CSCSMS.CSC.MOVIE5D

FIELD            COLUMNS   DATA CLASS
Movie Number      1-3      numeric
Movie Name        5-30     alphanumeric

Example of input
145 THE GOOD, BAD AND UGLY
232 THE WILD BUNCH
--------------------------------------------------------------------------------------------------
EXAMPLE OF OUTPUT:
REPORT #1                                                MO/DA/YEAR
**********************************************************************
NAME               NUMBER  MOVIE RENTED               STORE #
***********************************************************************
STEVE SAMUELS        1234
                      145  THE GOOD,BAD AND UGLY        1
                      234  MARY POPPINS                 2
                      342  REESEVOIR DOGS               4
                      232  THE WILD BUNCH               2

JOEL BERNSTEIN       1584
                      342  RESERVOIR DOGS               4
                      145  THE GOOD,BAD AND UGLY        2

TOTAL CUSTOMERS = 2  TOTAL MOVIES RENTED = 6
 
 

REPORT #2                                                MO/DA/YEAR
***********************************************************************
MOVIE#  STORE #1 STORE #2 STORE #3 STORE #4 STORE # TOTAL
***********************************************************************
145       1        1                                   2
232                1                                   1
234                1                                   1
342                                   2                2
 

EXTRA CREDIT -- Make a bar graph (horizontal) showing store number and bar length to reflect total number of movies loaned out (+5 points)