Homework #7

Due 2 May, 1997, 5:00 PM

Getting ready

You will need an account on uncavx.unca.edu in order to complete this assignment.

First, FTP into your uncavx directory all files in /usr/local/csci/241/home07 on the Computer Science Unix machines. (Yes, I know this is a pain, but I can't figure out the directory protection stuff in VMS.) The FTP session should like something like

VMS> ftp ftp.cs.unca.edu
Connected to woodfin.cs.unca.edu.
Name (woodfin.cs.unca.edu:USERID):
331 Password required for USERID.
Password:
230 User USERID logged in.
FTP> cd /usr/local/csci/241/home07
FTP> get book.txt
FTP> get update.txt
FTP> get create.cbl
FTP> get update.cbl
FTP> quit
VMS>                   

Tour of the files

The file book.txt is a text input file used to create the indexed file. The file consists of 60 character lines in which columns 1-10 are a book ISBN and columns 11-60 are a book title. The file update.txt is in the same format as book.txt. It contains new and updated records for the indexed file.

A complete COBOL program for creating the indexed file is stored in create.cbl. When the program is run, the new indexed file will be stored under the name book.ind and a listing of the results of the run will be stored in book.lpt. Create these two files by running the following VMS commands to compile, link, and execute create.cbl.

VMS> COBOL/ANSI_FORMAT CREATE.CBL
VMS> LINK CREATE
VMS> RUN CREATE

Then use pico to look at the file book.lpt. There will be an error message in the file. You can also look at book.ind though the view won't be exciting.

A partial COBOL program for updating the indexed file is stored in update.cbl. The program is only missing one (or two or three) paragraphs. Right now it has enough code to read, or query, the indexed file, but not enough to update it.

Your assignment

I'm sure you've guessed it by now. Finish update.cbl.

You only need to add ten to twenty statements to update.cbl. When you're done email the result back to me.


Back to the homework index
Back to the CSCI 241 home page