CSC 203-903 COBOL ASSIGNMENT #1

Due Monday, April 9, 2001

This program will be graded on a 50 point basis. A 10% penalty per week applies if you miss the due date. The assignment will NOT be accepted after April 23, 2001.

Objectives:

1) To gain experience in writing COBOL programs 
2) To gain experience in using MicroFocus Cobol 
3) To gain experience preparing edited output (for reports) 
4) To gain greater experience "debugging" simple COBOL programs 

Background Information:

Macrohard Ltd is a a fast-moving automated company. Virtually all of their activities utilize the computer somehow. However, much to their personnel director’s dismay, no one has ever printed a list of employees and their telephone extensions, even though this data is stored in the computer. A company telephone directory must be prepared from the employee file.

Program Specifications:

The record layout for the input file and output file follow. Use these file specs to code the ENVIRONMENT and DATA DIVISION statements. Remember, the field names and variable names you use, must agree with the field and variable names used in the PROCEDURE DIVISION statements.

In creating your program, use the sample program class 1 handout as a guide. The input file (Employee.txt) can be obtained by clicking on this hyperlinked file name and saving the file to a diskette.

Submit:

    1. A printed listing of your source code (.cbl file).
    2. A print out of the resulting output file.

 

Record Layout

File Name: Company Telephone Directory Listing (Employee.txt)

File Description: This file contains all the employee names and phone extension. Each line of the printed report is to contain the names and extensions of two employees.

File Type: Sequential

Usage: Input

Field Name

Size

Type

Comments

Employee Number

7

Alphanumeric

 

Last Name

11

Alphanumeric

 

First Name

9

Alphanumeric

 

Address

13

Alphanumeric

Street Address

City

8

Alphanumeric

 

State

2

Alphanumeric

State Abbreviation

Zip code

5

Alphanumeric

 

Date of Birth

6

Numeric

MMDDYY

Date of Hire

6

Numeric

MMDDYY

Annual Salary

6

Numeric

Integer value

Number of Dependents

2

Numeric

 

Department

3

Alphanumeric

Code e.g. MKT - Marketing

Telephone Extension

4

Alphanumeric

 

 

 

Report Layout

File Name: Company Telephone Directory Listing

File Description: Each line in the printed report contains the name and phone extension of an employee.

File Type: Sequential

Usage: Output

Field Name

Size

Type

Comments

Last Name

11

Alphanumeric

 

First Name

9

Alphanumeric

 

Phone Extension

4

Alphanumeric