Lab 7

Goals

Use edited output for all information

Part A – Adding and deleting records from a master file

Note: all of the following data files can be found in the ~sgomori/students/cis314 directory.

Write a COBOL program named lab7a.cob to perform the following:

There exists a master file (lab7mast.dat) for the UHOH Insurance System that contains patient data for those people who still owe payment toward their hospital bill. Since patients are continually being added to and deleted from the system, there exists two transaction files - one that contains the patients to be added to the system (lab7add.dat) and another file that contains the information necessary to delete patients from the billing system (lab7del.dat).

lab7mast.dat and lab7add.dat have the following record description:

Each file has a key-field group item, which contains the Hospital Number and the Patient Number and uniquely identifies each record.

lab7del.dat contains only the Hospital Number (pic 9(3)) and Patient Number (pic 9(5)) in each record.

Assumptions

Problem

Add and delete the records specified in the 2 transaction files to update the master file.

Part B – Modifying lab4b for this file

To help verify your part a, copy lab4b.cob (naming it lab7b.cob) to generate a report using the master file as input. The input file layout is slightly different for the master file than it was for lab4b, so you need to adjust it.

Submitting Lab 7

The files to submit are:

Deleting Unnecessary Files

Use the clean utility described in Lab 2.