1 06/12/87  read_file, rdfile
  2 
  3 
  4 Syntax:  read_file {args}, rdfile {args}
  5 
  6 
  7 Function:  reads the current tape file into the segment described
  8 by args.  The   default action of this request with no arguments
  9 queries the user as to the segment name he wishes the tape file
 10 to be read into and then issues a warning telling the user that
 11 the current tape file will be read in as a stream file with no
 12 conversion.  The user is asked if he wishes to continue.  If he
 13 answers yes, then the tape file is read into the designated segment
 14 and a newline character is appended to each physical record.  If the
 15 user answers no, then control is returned to the request loop.  If
 16 the tape is one of the five standard types, each record is checked
 17 to determine if it is a valid label or trailer record.  If it is,
 18 pertinent information about the record is displayed and the record
 19 is not written to the output segment.
 20 
 21 
 22 Control arguments:
 23 -output_file {STR}, -of {STR}
 24    where STR specifies the segment name for the tape file to be read
 25    into.  If STR is omitted, the user is queried for the segment name.
 26 -count N, -ct N
 27    allows reading up to N files, or until logical end of tape is
 28    encountered.  After the first file is read in, the -count
 29    iteration count is appended to the end of the user-designated
 30    output file name as a second component.  If N is not specified for
 31    "-count" control argument then 1 is assumed.
 32    For example:
 33 
 34             rdfile -ct 3 -of file1
 35 
 36    names the first output file file1, the second file1.2, and the
 37    third file1.3.
 38 
 39 
 40 -multics, -mult
 41    specifies that the input tape file is in Multics standard system
 42    format.  The data portion of each unrepeated record is written to
 43    the specified stream output file.  No attempt is made to separate
 44    the contents of the physical record into a logical format.  Since
 45    standard Multics tape format specifies that an EOF mark be written
 46    every 128 records, the "-extend" and "-count" arguments should be
 47    used to ensure that all of the data is recovered.
 48 -gcos, -gc
 49    specifies that the input tape file is in GCOS standard system
 50    format.  That is, each record has a block control word and
 51    several record control words dividing the physical record into
 52    logical records.  Each record is processed accordingly.
 53 
 54 
 55    BCD records are converted to ASCII.  ASCII records are copied
 56    directly.  Binary compressed deck card images are decompressed
 57    and converted to ASCII.  If a BCD card image is identified as a
 58    "$ object" card, this card image and all successive binary card
 59    images, until a "$ dkend" card image is identified, are copied to
 60    a separate file whose name is formed from columns 73 - 76 of the
 61    $ object card with a suffix of ".obj".  If a BCD card image is
 62    identified as a "$ snumb" card, this card and all following card
 63    images, until another $ snumb card or end of file, are copied
 64    into a file whose name is formed from columns 16 - 21 of the
 65    $ snumb card with a suffix of ".imcv".  If a BCD card image is
 66    identified as a "$ <language>" card, this card and all following
 67    card images, until another $ <language> card or end of file, are
 68    copied into a file whose name is formed from columns 73 - 76 of
 69    the $ <language> card with a suffix of ".ascii".
 70 
 71 
 72    This file is also surrounded by sufficient GCOS "JCL cards" so that
 73    the completed "deck" can be assembled using the Multics GCOS
 74    Environment Simulator.  If columns 73 - 76 of the $ <language>
 75    card are blank, the $f <language> card image is displayed and the
 76    user is queried for the filename.
 77 -cp5
 78    specifies that the input tape file is in CP5 standard system
 79    format, which consists of variable length records, recorded in
 80    EBCDIC.  Each variable length logical record is written to the
 81    specified stream file, with a newline character appended to the
 82    end.  The data read from the tape is automatically converted from
 83    EBCDIC to ASCII.
 84 
 85 
 86 -dec
 87    specifies that the input tape file is in Digital Equipment
 88    Corporation (DEC) standard system format.  Each DEC word is 40
 89    bits long, of which the first
 90       32 bits and the last four bits are concatenated to form one
 91       36-bit word.  The other four bits are discarded.  The
 92       converted data is then written onto the specified file in raw
 93       format.
 94 -ibm_vb {STR}
 95    specifies that the input tape file has standard IBM
 96    VB-formatted variable-length records with embedded block and
 97    control words.  STR can be ebcdic, ascii, or binary (bin).
 98    (Default:  ebcdic)
 99 
100 
101 -ansi_db {STR}
102    specifies that the input tape file has ANSI-standard
103    DB-formatted variable-length records with embedded record
104    control words.  STR can be ascii, ebcdic, or binary (or bin).
105    (Default:  ascii)
106 -output_description, -ods
107    allows you to specify a standard Multics I/O attach
108    description to receive the tape file data.  User queries ask
109    you to input the attach description and the opening mode.  You
110    can express opening modes in long form or in abbreviation form
111    (e.g., sequential_output, sqo).
112 -extend
113    allows you to concatenate the contents of several tape files
114    into one output file.  This control argument has meaning only
115    if you also specify -count.
116 
117 
118 -nnl
119    allows escape from the read_file default of appending a new
120    line character to the end of each physical record, when you
121    give no other format specification.
122 -truncate N, -tc N
123    allows you to truncate each physical record to a length of N
124    characters.
125 -skip N
126    allows you to skip N characters (e.g., a record or block
127    control word) at the beginning of the physical tape record.
128    It is useful when you are processing tapes of an unfamiliar
129    format.
130 
131 
132 -logical_record_length N, -lrl N
133    allows you to divide each physical tape record into several
134    logical records of length N.  Each logical record is written
135    to the specified file with a new line character appended to
136    the end.  Logical records cannot span physical blocks.
137 -convert STR, -conv STR
138    allows you to convert the data format of each tape record,
139    where STR can be one of the following:
140 
141       ebcdic_to_ascii, ebcdic
142          converts input EBCDIC data to ASCII.
143 
144       bcd_to_ascii, bcd
145          converts input BCD data to ASCII.
146 
147 
148       comp8_to_ascii, comp8
149          converts input comp8 (four-bit-packed decimal) data to its
150          equivalent ASCII representation.
151 
152 
153 
154 
155 
156 
157 
158 
159 
160 
161