Assignment 3 - Cobol Summer 2000

The Northern Ice Hockey Association is having a problem collecting membership dues. On a recommendation from the National Office, they have decided to enlist your help. The association's membership information needs to be placed in a table for easy transaction processing.

The first half of the input file is composed of member account information records with the following format:

COLUMNS DATA

1 - 25   Member's name
26 - 31 Membership (Account) number
32 - 38 Account Balance PIC S9999V99 (sign is leading separate character)
39 - 80 Filler

There are exactly 25 records which are already sorted in ascending sequence by account number. The Account Balance field will have a separate leading sign (a negative sign means that the member has already prepaid next year's dues.) As you read in these records, place the information into a table.

The end of this set of records is indicated by an account number and a balance of all zeros. Do not put this record into the table.

The records that follow these first 25 records will have the following format:

COLUMNS DATA

1 - 6        Membership (Account) number
7 - 12      Transaction amount PIC S9999V99 (sign is leading separate character)
13 - 80     Filler

The transaction amount has a separate leading sign, with a minus signifying a payment of dues and a plus (+) signifying the cost of a new membership. In this set of records, the account numbers are presented in random order; therefore, you must search the table of membership information using SEARCH ALL. See the new set of notes posted on the Web site (Numbers and Tables) for a discussion of the SEARCH ALL verb.

As you process the transaction records, print a transaction report. The balance field in the report will be the updated balance after processing the payment or cost present in the transaction record. The transaction report should resemble the following: (alignment and values are not true to facts)

99/99/99 Northern Ice Hockey Association Page nn
Membership Account Information

MEMBER     MEMBER
NUMBER     NAME            DUES      PAYMENT     BALANCE

999-999     Betty Sue              999.99                              999.99
999-999 *** INVALID ACCOUNT NUMBER ***
999-999     John Brady                              999.99-           999.99-

After all the transaction records have been processed, print a summary report that lists information for each member's account. That is, print the contents of the table:

999/99/99     Northern Ice Hockey Association       Page nn
Summary Report

Member Member Total Num Of Total Num Of Final
Number Name New Dues Charges Payments Payments Balance
999-999 XXXXXX 999.99 99 999.99 99 999.99
000-999 YYYYYY 999.99 99 999.99 99 999.99
Totals: $9999.99 99 $9999.99 99 $9999.99
Averages: $9999.99 99 $9999.99 99 $9999.99

The number of charges and payments are the number of transaction records for each member. For example, if there were two payment transaction records for member Beth Jones, then her number of payments would be 2.

Use the COBOL intrinsic functions SUM and MEAN to calculate the Association Totals and Averages. This means that the total new dues, number of charges, total payments, and number of payments must also be stored in the table.

After finishing the summary report, write out a file of information that consists of "preferred members." A "preferred member" is one whose current balance (after being updated by the transaction record) is less than zero.

After writing out this file, use the utility program IEBPTPCH to print the contents of this file. After you have printed this file, delete the file using the utility program IEFBR14.

Programming Notes:

All tables used in this program should be indexed tables.

Use SEARCH ALL (the binary search) to search the table.

If you find an invalid account in the transaction records, print an appropriate message.

Print 10 double spaced detail lines per page. Triple space before the summary Totals line.

Use zero suppression and commas in your dollar figures.

Note that there can be multiple transactions for the same account.

Write your own JCL to Compile and execute this program using the Loader.

The Input data set to be read by the Cobol program is named T90RAZ1.COBDAT3..

 

This is what you will feel like if you do everything in this program ----->scream.gif (7457 bytes)