New Jersey Institute of Technology
College of Computing Sciences
CIS365: File Structures and Management
Rich Egan

A Public Research University

Quick Links: [Materials] [WebCT access/info


Semester Project - P4-5: Reading Data Files and Creating Reports

Goal:

To apply the concepts and skills we're learning in class to a larger case.

Due Date:

See Syllabus

Assignment

Part a:

Write two programs, where each will create one of the reports from homework #P2 (that's two reports total, one created by each program). Pick the two reports that each use a single data file. Make sure the reports have headers. Add some totals if this is appropriate.

If you cannot use one or both data files you created in homework #P3, you will need to write a COBOL program to create each file in order to create your report.

The practice program at the end of Chapter 6 from Stern & Stern provides a good model for your programs.

Part B:

Design a data file where the records can be grouped at two levels, so you can use it for a report with two levels of control breaks. Then design two reports. One report will group the records by the major control break field, and thus have a single-level control break. The second report use the same data file. It will group the records by the major control break field as well as by a minor control break field, and thus be a two-level control break report. Stern & Stern chapter 10 gives several examples. (For the extra credit program below, make sure that that the data file's records can be grouped at three different levels.)

(1) Write a COBOL program to create the data file.

(2) Write a COBOL program to create the first report with this data file with a single-level control break. The first thing your program should do is sort the data file on the control break field. (See Stern & Stern chapter 14 for simple sorting.) Then use the sorted data file for your report. The report should include one or more subtotals (sum, count of records, etc.) printed at each control break. It also should print these totals for all the records at the end of the report.

(3) Once you have this working, write a second COBOL program to create the second report with this data file with a two-level control break. The first thing your program should do is sort the data file on both the major and minor control break fields. Then use the sorted data file for your report. The report should include one or more subtotals (sum, count of records, etc.) printed at each minor control break and each major control break. It also should print these totals for all the records at the end of the report.

Submission

Staple everything together. Put the name of everyone in your group on the front. Be sure to include your name. Only one submission per group, please.

Turn in:

- a printout of your COBOL code (.cob file) for each report file 

- a printout of each data file - use a word processor to print out each. (Include these even if they are the same files as you created last week.

- a printout of each report file - The file is outputted to a text file so use a word processor to print out each.

** Save your .cob files onto a disk and bring them to class we may review peoples code

Put it all together in a single word document for submission to WebCT and bring the printed copy to class

Responsibility

Even though this is a group project, every member of the group should understand every aspect of the project. Your group should get together after each homework assignment is complete and review the entire assignment to ensure that everyone understands everything.


last updated: 1/30/2006

This page: p4.htm