These pages contain -
Where required, test data files are also supplied.
The simple programming exercises are normally given as lab exercises. Good students should be able to do these in little more than one or two hours.
The specifications for the programming exams are actually old exam papers. Good students should be able to produce a working program in four to six hours.
Unlike the exercises described above, the programming project specifications require programs that can not be written in one sitting. For each project, an estimate of the number of hours it should take to complete the project has been given.
In our course we normally allow students about one week for every 5 hours of the completion estimate. In other words if we estimate that a programming project will take 20 hours to complete, we allow the students 4 weeks to do it.
These COBOL programming exercises, program specifications, and sample programs are the copyright property of Michael Coughlan. You have permission to use these materials for your own personal use but you may not reproduce them in any published work without written permission from the author.
CountDown - Exercise using the ACCEPT, DISPLAY, PERFORM ... TIMES, COMPUTE and IF.
Reading Sequential Files - READ, PERFORM.. UNTIL, DISPLAY
Counting records in a Sequential File - READ, PERFORM..UNTIL, DISPLAY, IF, COMPUTE
Writing to a Sequential File - ACCEPT, DISPLAY, WRITE, PERFORM..UNTIL,
Inserting records into a Sequential File - READ, WRITE, PERFORM.. UNTIL.
Updating records in a Sequential File - READ, WRITE.
Sorting a Sequential File - SORT, READ, RELEASE, Input Procedure.
Tables - READ, pre-defined Tables, Tables.
Student Fees Report
Write a program to apply a transaction file of student payments to a Student Master File and then produce a report showing those students whose fees are partially or wholly outstanding.
(Indexed files, Print files, READ..NEXT RECORD, START, WRITE, REWRITE, IF,
PERFORM, ADD, SUBTRACT)
Aromamora Summary Sales
A program is required to produce a summary sales report from an unsorted sequential file containing the details of sales of essential and base oils to Aromamora customers.
(SORT with Input Procedure and Output Procedure, Print Files, Sequential Files, COMPUTE)
FlyByNight Summary File
A program is required which will read the tourist bookings master filee to produce a summary file sequenced upon ascending Destination-Name.
(Pre-Filled Tables, Sequential Files, SORT with Input Procedure, SEARCH, INSPECT)
A program is required which will apply a file of sorted, validated transactions to the Oil-Stock-File and then produce a report based on the contents of both the Oil-Details-File and the Oil-Stock-File. The report writer must be used to produce the report which must be printed sequenced on ascending Oil-Name.
(Indexed files, Relative Files, Sequential Files, Report Writer, EVALUATE, COMPUTE, READ, WRITE, REWRITE, START)
A program is required to produce a Purchase Requirements Report from the Publisher, Book and Purchase Requirements files. The report should be sequenced on ascending Publisher Name and should only detail the purchase requirements for the semester under scrutiny.
(Indexed files, Report Writer, Report Section, INITIATE, GENERATE, TERMINATE, READ, WRITE, REWRITE, START)
ACME Stock Reorder
A program is required which will process the Stock and Manufacturer files to create an Orders file containing ordering information for all the parts that need to be re-ordered (i.e. where the QtyInStock is less than the ReorderLevel). For EU countries only, the COSTOFITEMS and POSTAGE fields of each Orders file record must be calculated. The Postage rate is obtained by calling an existing program.
(Indexed files, Relative Files, SubPrograms, CALL..USING, READ, WRITE, REWRITE, Condition Names (level 88s), EVALUATE, UNSTRING, MULTIPLY..ON SIZE ERROR)
File Conversion A program is required to convert the unsorted Client-Names file of free-format, variable length, records into a sorted file of fixed length records. The sorted file must be sorted into ascending Client-Name within ascending County-Name. In addition to converting and sorting the file, the program must ensure that the county name is valid and must convert it to a county number.
(Sequential files, SORT with Input Procedure, Pre-Defined Table of values, STRING, UNSTRING, INSPECT, SEARCH ALL )
USSR Ship Report
A program is required to produce a report detailing the major vessels (Vessels of tonnage 3,500 or greater and all submarines) in each of oceans and major seas of the world.
(Sequential files, SORT with Input Procedure, Print Files, Pre-defined tables, Condition Names)
Science Fiction by mail A program is required to apply the Orders file (containing customer orders) to the Book Stock file and to produce the Processed Orders file.
(CALL, subprograms, Sequential files, Indexed files, READ, WRITE, REWRITE, COMPUTE, UNSTRING)
A program is required which will produce a file, sorted on ascending email domain, from the unsorted GraduateInfo file.
(SORT with Input Procedure and Output Procedure, Sequential Files, Pre-Defined Tables, Run time filled tables, SEARCH)
Each time a book is borrowed, the Pascal Memorial Library pays the author a small sum of money as royalty. Royalties are paid to authors through their agents. A report is required which processes the Authors file and the Books File to produce a report which shows the amount to be sent to each agent, shows the breakdown of the agent payment into author payments, and shows the breakdown of each author payment into royalty payments per book.
(Indexed Files, Print Files, READ..NEXT RECORD, READ..KEY IS, START, REWRITE, WRITE, MULTIPLY, SET)
The manager of Metropolis Videos has asked you to write a program to produce a report showing the top three Video Suppliers (by total store video earnings) and for each of the top three the most popular video title (by average earnings) must be shown.
(Indexed Files, Relative Files, Print Files, READ, START, Tables, DIVIDE)
FolioBestSellersRpt The Folio Society is a Book Club that sells fine books to customers all over the world. A program is required to print a list of the ten best selling books (by copies sold) in the Book Club.
(Sequential Files, Print Files, SORT with Input Procedure and Output Procedure, Tables)
DueSubsRpt NetNews is a company which runs an NNTP server carrying the complete USENET news feed with over 15,000 news groups. Access to this server is available to internet users all over the world. Users of the system pay a subscription fee for access. The fee may be paid monthly ($20), half-yearly ($100) or yearly ($180). A program is required to produce a report showing the subscriptions which are now due. The report will be based on the Due Subscriptions file.
(Sequential Files, Print Files, SORT with Input Procedure, Tables, SEARCH ALL)
A program is required which will produce a report from the file produced by the Evaluation Form on the CSIS web site. For each country from which the site has been visited the report should show-
The report must be implemented as an HTML web page
and the information on the page should appear in ascending country name
| Aromamora PLC
is a company which sells essential oils to Aromatherapists, Health Shops,
Chemists and other mass users of essential oils. Every month, details
of sales to these customers are gathered together into a Sales File .
A program is required that will produce a report from this file showing
the quantities and values of essential oils purchased.
|Newtronics File Maintenance||
A program is required to do file maintenance of the Stock master file
and the Supplier master file of Newtronics Plc. using a file of transaction
|Aroma Invoices Report||A program is required that will
examine the Aromamora Customer and Invoice files and from them produce
a report showing the the unpaid customer invoices. The Cobol Report-Writer
must be used to create the report.
|MunsterSurnamesFreqRpt||A program is required that will
process the Census Population File to produce a report showing the surnames
that occur most frequently in the counties of Munster.
|CAO points calculator||A program is required that will
process the CAO Applications file and the Leaving Certificate Results
file to create a Course Points File and to generate a report showing the
number of applicants from each county to the University of Limerick (UL),
the number of first choices for each UL course, and the number of first
choices for the UL.
|To Student Resources||Evaluation Form||Search CSIS Web Site||