Computer Science 255
A major exercise in sequential files, control scripts, and
documentation
Due: Various (see the following)
We have already done part of this exercise - in the following, you
will use MERGE.COB, VALIDATE.COB, and SCRIPT01.COM.
The file dia0:[matthews.cs255]master.dat contains records as
follows:
- PNO
- PNAME
- DEPARTMENT
- UNIT-COST
- AMT-ON-HAND
See the earlier write-up for size and data type.
- Write a program (call it MFU.COB) which will read the file
TRANSACTIONS.DAT generated by VALIDATE.COB and MASTER.DAT and
which will produce:
- An updated file NEWMASTER.DAT
- A listing of the new master file: NEWMASTER.LIS
- A listing of all transactions: TRANSACTIONS.LIS (note that
this is a level-break program). A listing of exceptions:
EXCEPTION.LIS. This list should include the attempt to insert an
existing part, delete or modify a non-existing part, delete a part
where the amount remaining is greater than 0, or any transaction
that would bring the amount on hand to greater than the capacity
of the field in the master file to store the data, or to an amount
less than 0. In each of these cases, reject the transaction and
log it in the exceptions file.
- Expand your script file (written in an earlier exercise) so
that it does the following (note the additional documentation
requirement following). Call the result SCRIPT.COM
- step 1: Sort PARTA.DAT
- step 2: Sort PARTB.DAT
- step 3: Merge
- step 4: Validate
- step 5: Print (TYPE) REJECT.LIS
- step 6: delete REJECT.LIS
- step 7: MFU
- step 8: Print (TYPE) NEWMASTER.LIS
- step 9: Print (TYPE) TRANSACTIONS.LIS
- step 10: Print (TYPE) EXCEPTIONS.LIS
- steps 11 - 12: Delete TEMPA.DAT and TEMPB.DAT
- steps 13 - 15: Delete NEWMASTER.LIS, TRANSACTIONS.LIS, and
EXCEPTIONS.LIS
- steps 16: Rename MASTER.DAT to OLDMASTER.DAT
- steps 17: Rename NEWMASTER.DAT to MASTER.DAT
- The file SCRIPT.COM should have the usual header
documentation. In addition, each step should be numbered and its
purpose clearly stated (though for the PRINT, DELETE, and RENAME
steps, some initial statement can work for a series of
statements). For steps executing one of your programs, or for one
of the system SORT steps, the documention describing the step
should also say what the inputs and outputs to the step are.
Documentation should be formatted so as to be easy to read.
- Finally, we need some documentation (fastback bound, cover
page with your name). The documentation should include:
- A title page with your name.
- A table of contents
- An introduction (make up the company for which the project is
written)
- Text and graphics describing each step in the process (a "run
book"). Each step should be described by a simple system flow
diagram and some text (perhaps one paragraph, or several
sentences) describing what is done at that step, what the inputs
are and where they come from, and what the outputs are and where
they are going). Step numbers should be matched to SCRIPT.COM.
- A data flow diagram (DFD) describing the overall system.
- Exhibits, including copies of the source for the programs and
the control file together with one-page samples of the files
involved and the reports produced.
Due dates:
- MFU.COB and SCRIPT.COM will be due Friday, Nov. 21
- The remaining parts of the assignment will be due on the last
day of class