Most files on the system are stored in what is known as GFRC format. This format is documented fully in the GMAP Pocket Guide and in the GCOS-8 File and Record Control manual. Here we will only give a rough outline of GFRC format types and their uses.
Every GFRC file is made up of a number of records; in a standard ASCII text file, for example, every line of text is a separate record. Each record has an accompanying Record Control Word (RCW) that contains the length of the record plus a few other tid-bits of information about the record. In particular, the RCW specifies the record's Report Code and its Media Code.
Report codes and media codes were originally designed for use by SYSOUT, the program that supervises such major output devices as printers and punches. However, other programs now pay attention to these codes (especially media codes), simply because they are convenient ways for determining the nature of a file's contents.
Report codes provide a way for SYSOUT to separate output according to its source. For example, a Fortran program may have several open output units, each of which may be receiving output destined for SYSOUT. Every time a record is written to one of these units, the unit number is used as the report code for the record. Later on, SYSOUT can go through the total output of the program and use the report codes to separate which records came from unit 06, which from 42, and so on. This allows the output from each unit to be printed separately instead of having the output records intermingled.
Media codes tell SYSOUT what processing is necessary when outputting each record. In particular, the media codes tell SYSOUT whether the output is designed for printing or punching. (At Waterloo we no longer have a punch, but some of the older software works with files in punched card formats, so we have not "retired" any of the elderly media codes.)
Each media code indicates a different type of record. Since files usually only consist of one type of record, it is common to use such terms as "a Media6 file", even though the media code refers to individual records in the file, not the file as a whole. Below we list the currently recognized media codes.
As mentioned earlier, different programs use the various media codes for their own purposes. The way SYSOUT handles different media codes is described below.
Copyright © 1996, Thinkage Ltd.