CSIS Web Site
Email Domain File

Time to complete Allow 4 hours continuous.
Program Download CSISEmailDomain.cbl is a model answer. Don't look at this until you have made your own attempt at the program.
Example Output

SortedDomain.Dat is the file, sorted on ascending email domain, that is produced from the GraduateInfo file.

Example Input

Gradinfo.Dat is the file that contains information about CSIS graduates that has been collected from the form on the CSIS web site.

CountryCodes.Dat is the file that contains the Country Codes and their corresponding Country Names.

Exam Practice

If you want to try out the exam under the same conditions as our students you can write the program in a printed version of EmailDomainExm.Doc which is an MS-Word file containing the program outline. The example data files containing input data files and the output file that is produced from them is in theMS-Word file DataFiles.Doc.

Remember to make sure that you have a copy of the COBOL metalanguage elements available for reference.

Under these conditions you have 2.5 hours to write the program.

Major Constructs SORT with Input Procedure and Output Procedure, Sequential Files, Pre-Defined Tables, Run time filled tables, SEARCH

Introduction

One purpose of the CSIS web site is to collect, and display, the current email addresses of all CSIS graduates.† Graduates who visit the site are asked to provide their name, year of graduation, course of study, current email address and current location.†† This information is processed to extract the email domain, which is then stored, along with the other information, in the GraduateInfo file.† The email domain is the part of the email address that follows the @ sign.† For instance, ul.ie is the email domain in the email address -† michael.coughlan@ul.ie.

A program is required which will produce a file, sorted on ascending email domain, from the GraduateInfo file.† The new file should contain only information about graduates who have taken full CSIS courses (Course codes 1-5).† The records of the file should contain only the email domain name, the student name, the year of graduation, the course name and the name of the country where the graduate is currently located.†† Report programs, written by others, will make use of this sorted file.

 

Files

GraduateInfo File

The GraduateInfo File is an unordered sequential file.† Records of the file have the following description;

Field

Type

Length

Value

StudentName

X

25

-

GradYear

9

4

-

CourseCode

9

1

1-7

EmailAddr

X

28

-

EmailDomainName

X

20

-

CountryCode

X

2

-

 

SortedEmailDomain File

The SortedEmailDomain File is a sequential file, ordered on ascending EmailDomainName. Records of the file have the following description -

 

Field

Type

Length

Value

EmailDomainName

X

20

-

StudentName

X

25

-

GradYear

9

4

-

CourseName

X

25

-

CountyName

X

26

-

 

Processing

In an Input Procedure, eliminate records of students who graduated in the Language and Computing or Language with Computing degrees (Course codes 6 and 7).† The email address field is not required in the sorted file so make sure records sent to the Sortís work file do not contain this field.

In an Output Procedure, convert the CountryCode into a CountryName and the CourseCode into a CourseName.

The country codes and their corresponding names are contained in a sequential file (CountryCodes.Dat). To allow an efficient conversion of the country code to the country name this file must be loaded into a table in memory.†† There are currently 243 countries in the file.

 

CountryCode File

The CountryCodes file is a sequential file ordered on ascending CountryCode.†† Each record contains a CountryCode and its corresponding CountryName.

 

Field

Type

Length

Value

CountryCode

X

2

-

CountryName

X

26

-

 

CourseCode Table

The CourseCode can be converted into a CourseName using the pre-filled table provided in the program outline.† The CourseName corresponds to the CourseCode as follows -

CourseCode

CourseName

1

Computer Systems

2

Grad. Dip. Computing

3

Grad. Dip. Localisation

4

Grad. Dip. Music

5

Computing with† French

6

Language and Computing

7

Language with Computing




Copyright Notice

This COBOL project specification is the copyright property of Michael Coughlan. You have permission to use this material for your own personal use but you may not reproduce it in any published work without written permission from the author.