CSIS Web Site
|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.|
SortedDomain.Dat is the file, sorted on ascending email domain, that is produced from the GraduateInfo file.
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.
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|
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 -† email@example.com.
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.
The GraduateInfo File is an unordered sequential file.† Records of the file have the following description;
The SortedEmailDomain File is a sequential file, ordered on ascending EmailDomainName. Records of the file have the following description -
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.
The CountryCodes file is a sequential file ordered on ascending CountryCode.†† Each record contains a CountryCode and its corresponding CountryName.
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 -