06/12/87 read_file, rdfile Syntax: read_file {args}, rdfile {args} Function: reads the current tape file into the segment described by args. The default action of this request with no arguments queries the user as to the segment name he wishes the tape file to be read into and then issues a warning telling the user that the current tape file will be read in as a stream file with no conversion. The user is asked if he wishes to continue. If he answers yes, then the tape file is read into the designated segment and a newline character is appended to each physical record. If the user answers no, then control is returned to the request loop. If the tape is one of the five standard types, each record is checked to determine if it is a valid label or trailer record. If it is, pertinent information about the record is displayed and the record is not written to the output segment. Control arguments: -output_file {STR}, -of {STR} where STR specifies the segment name for the tape file to be read into. If STR is omitted, the user is queried for the segment name. -count N, -ct N allows reading up to N files, or until logical end of tape is encountered. After the first file is read in, the -count iteration count is appended to the end of the user-designated output file name as a second component. If N is not specified for "-count" control argument then 1 is assumed. For example: rdfile -ct 3 -of file1 names the first output file file1, the second file1.2, and the third file1.3. -multics, -mult specifies that the input tape file is in Multics standard system format. The data portion of each unrepeated record is written to the specified stream output file. No attempt is made to separate the contents of the physical record into a logical format. Since standard Multics tape format specifies that an EOF mark be written every 128 records, the "-extend" and "-count" arguments should be used to ensure that all of the data is recovered. -gcos, -gc specifies that the input tape file is in GCOS standard system format. That is, each record has a block control word and several record control words dividing the physical record into logical records. Each record is processed accordingly. BCD records are converted to ASCII. ASCII records are copied directly. Binary compressed deck card images are decompressed and converted to ASCII. If a BCD card image is identified as a "$ object" card, this card image and all successive binary card images, until a "$ dkend" card image is identified, are copied to a separate file whose name is formed from columns 73 - 76 of the $ object card with a suffix of ".obj". If a BCD card image is identified as a "$ snumb" card, this card and all following card images, until another $ snumb card or end of file, are copied into a file whose name is formed from columns 16 - 21 of the $ snumb card with a suffix of ".imcv". If a BCD card image is identified as a "$ " card, this card and all following card images, until another $ card or end of file, are copied into a file whose name is formed from columns 73 - 76 of the $ card with a suffix of ".ascii". This file is also surrounded by sufficient GCOS "JCL cards" so that the completed "deck" can be assembled using the Multics GCOS Environment Simulator. If columns 73 - 76 of the $ card are blank, the $f card image is displayed and the user is queried for the filename. -cp5 specifies that the input tape file is in CP5 standard system format, which consists of variable length records, recorded in EBCDIC. Each variable length logical record is written to the specified stream file, with a newline character appended to the end. The data read from the tape is automatically converted from EBCDIC to ASCII. -dec specifies that the input tape file is in Digital Equipment Corporation (DEC) standard system format. Each DEC word is 40 bits long, of which the first 32 bits and the last four bits are concatenated to form one 36-bit word. The other four bits are discarded. The converted data is then written onto the specified file in raw format. -ibm_vb {STR} specifies that the input tape file has standard IBM VB-formatted variable-length records with embedded block and control words. STR can be ebcdic, ascii, or binary (bin). (Default: ebcdic) -ansi_db {STR} specifies that the input tape file has ANSI-standard DB-formatted variable-length records with embedded record control words. STR can be ascii, ebcdic, or binary (or bin). (Default: ascii) -output_description, -ods allows you to specify a standard Multics I/O attach description to receive the tape file data. User queries ask you to input the attach description and the opening mode. You can express opening modes in long form or in abbreviation form (e.g., sequential_output, sqo). -extend allows you to concatenate the contents of several tape files into one output file. This control argument has meaning only if you also specify -count. -nnl allows escape from the read_file default of appending a new line character to the end of each physical record, when you give no other format specification. -truncate N, -tc N allows you to truncate each physical record to a length of N characters. -skip N allows you to skip N characters (e.g., a record or block control word) at the beginning of the physical tape record. It is useful when you are processing tapes of an unfamiliar format. -logical_record_length N, -lrl N allows you to divide each physical tape record into several logical records of length N. Each logical record is written to the specified file with a new line character appended to the end. Logical records cannot span physical blocks. -convert STR, -conv STR allows you to convert the data format of each tape record, where STR can be one of the following: ebcdic_to_ascii, ebcdic converts input EBCDIC data to ASCII. bcd_to_ascii, bcd converts input BCD data to ASCII. comp8_to_ascii, comp8 converts input comp8 (four-bit-packed decimal) data to its equivalent ASCII representation. ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved