IUP Computer Science
CO 300   Assembly Language
Spring 1988

Program #7    (due 2 May 1988)


    Write an extension of program #5 (Student Survey) that combines information from the three records that are read in with information in a file and stores the resulting information in another file.

    Your program should prompt for and accept the name of the input file and the name of the output file from the terminal.   Both the input and output files contain records that have the following format.
Cols 1-20     Major of a student (blanks in unused columns)
Cols 21-22    Class (FR, SO, JR, SR or GR)
Cols 23,24,25 Course grades for the courses CO250, CO310 and CO315, respectively
Cols 26-60    Remarks (optional)
    The program should procede in the following order.

1. Read in from the terminal and store three 58-byte records.

2. Prompt for and read in the names of the two files.

3. Copy one half of the records from the input file to the output file.  To do this, your program will first have to determine how many records are in the input file.

4. Write the appropriate information from the three records read at the terminal to the output file. There are no remarks for any of these records.

5. Copy the remaining records from the input file to the output file.

    I will supply the name of the input file on the day that the program is due.  You may make your own input file to practice with.  When you get your program working (and after I have given you the name of the input file), you are to run it twice.  The first time you run it, use my input file and whatever file name you want for the output file.  The second time you run it, use your output file from the first run for input and make up a new file name for output.  Enter three different records at the terminal when you make the second run.

    Hand in a .LIS listing of your program with a printout of the contents of BOTH output files and a directory listing showing the creation date for the .MAR, .LIS and .EXE files for program #7.  Make this printout by putting commands in a file and SUBMITting the file for batch processing.