1 08/02/84  gcos_reformat_syslib, gcrs
 2 
 3 Syntax as a command:  gcrs input_path {output_path} {record_length}
 4 
 5 
 6 Function:
 7 This command reformats the softw-syslib file (the library used by
 8 GELOAD) from the total system tape, so that it can be read by the
 9 simulator.
10 
11 
12 Arguments:
13 input_path
14    is the pathname of the file pulled from a GCOS total systems tape.
15    Typically, this is the file for "softw-syslib."
16 output_path
17    is the pathname for the reformatted data.
18 
19    If output_path is not given, the modifications are made to the input
20    file.  Since a temporary file is not used, quitting and releasing
21    while updating the input file leaves the file in an inconsistent
22    state, from which recovery is almost impossible.
23 
24 
25 record_length
26    is the number of words from each input record to be written to the
27    output file after the first data word of each input record is
28    discarded.
29 
30    If record_length is not given, the default is 321.  Record_length is
31    distinguished from output_path in that it must be numeric.  It may
32    precede or follow output_path, and output_path need not be given
33    when record_length is given.
34 
35 
36 Notes:  As read from the total system tape, the file contains 321-word
37 blocks.  The first is a block control word (BCW), and the next 320 make
38 up a block that GELOAD interprets itself.  The BCW of each block is
39 discarded, and the remaining 320-word blocks are packed together.  If
40 read from a 7-track tape, the word count is rounded up to the next even
41 number (322), so a word at the end must also be discarded.  The number
42 of words to be read is therefore an optional argument, with the default
43 being 321.  The first word is discarded, and the next 320 words are
44 always retained.
45 
46 The first word (the BCW) is checked for sequential block serial numbers
47 (BSN), and block lengths of 320 words or fewer, to verify that the
48 correct record length was used for reading, and that the words being
49 discarded are really BCWs.