09/20/87 read_tape_and_query, rtq Syntax as a command: read_tape_and_query volume_id {-control_args}, rtq volume_id {-control_args} Function: Allows an user to interactively inspect and determine the contents of a magnetic tape. Physical tape file processing capabilities are also provided. Note that once the command is invoked, you are placed in the read_tape_and_query subsystem where you may use the read_tape_and_query requests. The read_tape_and_query requests are listed below under "List of Requests". Arguments: volume_id is the local tape library designation of the requested tape volume. Control arguments: -abbrev, -ab enables abbreviation processing within read_tape_and_query. If this argument is specified and the -profile control argument is not given, then the user's default profile segment (>udd>Project_id>Person_id>Person_id.profile) is used. -block N, -bk N specifies the maximum physical record size to be processed, where N is the number of bytes. The default is 11200 bytes (2800 36-bit words). -comment STR, -com STR displays STR as a message on the operators console at the time that tape volume is mounted. If STR contains spaces, tabs or special characters, the entire STR must be enclosed in quotes. -density N, -den N specifies the initial density setting for tape attachment, where N is the number of bits per inch (bpi). The default is 800 bpi. Although the density is automatically determined (see "Notes" below), some tape subsystems may not have tape drives capable of handling the default density. -no_abbrev, -nab specifies that abbreviation processing is not to be done by the read_tape_and_query request processor. (Default) -no_prompt suppresses printing of the prompt character string ("rtq:") for read_tape_and_query requests. -no_request_loop, nrql doesn't enter the read_tape_and_query request loop. -profile PATH, -pf PATH specifies that abbreviation processing is to be done using PATH. The suffix ".profile" need not be given, however, ".profile" must be the last component of PATH. If this control argument is given then the "-abbrev" control argument need not be given. -prompt STR changes the prompt for the read_tape_and_query request loop to STR. If STR is a null string, "", then no prompt is given. (Default is to prompt with "rtq:"). -quit exits after performing any operations specified by control arguments. (Default is to enter the read_tape_and_query request loop). -request STR, -rq STR specifies an initial request line of STR is to be executed before entering the read_tape_and_query request loop. -request_loop, -rql specifies that the read_tape_and_query request loop be entered. (Default). -ring, -rg specifies that the tape is to be mounted with a write ring. This allows a tape that is already mounted with a write ring to be attached without operator intervention. The default is to mount the tape with no write ring. -track N, -tk N where N is 7 or 9 for 7 or 9 track tapes. If this control argument is not specified, 9 track is assumed. Notes: The read_tape_and_query command requests the specified tape volume to be mounted. After the mount request has been satisfied, read_tape_and_query automatically determines the tape density and checks for a recorded tape label. If the density can be determined, an informative message is displayed that includes the density. If the tape has a standard Multics, GCOS, IBM, ANSI or CP5 tape label, an informative message is displayed that includes the standard label type and the recorded volume name. If the tape contains a valid IBM or ANSI label, a second message is displayed informing the user of the physical block size and logical record length (in bytes) of the first data file. For all standard labeled tape volumes, the tape is then positioned to the beginning of the first data file. If the tape label is not recognized as one of the five standard types mentioned above, it is designated as unlabeled and the tape volume is repositioned to the beginning of the tape. The read_tape_and_query command then goes into a request loop whose requests are listed below. List of requests: ? lists the available read_tape_and_query requests and active requests. abbrev {-ca}, ab {-ca} turns abbreviation processor on or off and changes profile segments. . displays the command name read_tape_and_query with its short name (rtq) in parentheses. answer STR {-ca} request_line provides preset answers to questions asked by another request. bof position to the beginning of the current physical tape file. bsf {N} backspace N files. If N is not specified, 1 is assumed. bsr {N} backspace N records. If N is not specified, 1 is assumed. bsr will not cross backward to the previous file. debug_mode {-ca} enables or disables debugging mode for the rtq subsystem. density N, den N sets the tape density to N bits per inch (bpi), where N can be 6250, 1600, 800, 556 or 200. do request_string {args} expands a request line by substituting the supplied arguments into the line before execution, where request_string is a request line in quotes and args are character string arguments that replace parameters in request_string. dump {offset} {n_words} {char_types} displays the contents of the record buffer (filled with the read_record request) on the users terminal. If no arguments are specified, the contents of the entire tape buffer are displayed in octal format. The value of char_type can be selected from the following: -ascii displays the contents of the record buffer in octal with an ASCII interpretation of the data on the right side. -bcd displays the contents of the record buffer in octal with a BCD interpretation of the data on the right side -ebcdic displays the contents of the record buffer in octal with an EBCDIC interpretation of the data on the right side. -hex displays the record buffer in hexadecimal format. exec_com PATH STRs, ec PATH STRs executes a program written in the exec_com language which is used to pass request lines to the rtq subsystem and to pass input lines to read_tape_and_query requests which read input. Where PATH is the pathname of an exec_com program. (".rtq" suffix is assumed). STRs are substituted for parameter references in the program. execute LINE, e LINE executes the supplied LINE as a Multics command line. execute_string {-ca} {control_string {args}}, exs {-ca} {control_string {args}}, exs substitutes arguments into a control string. The expanded control string is then passed to the command processor or the rtq subsystem request processor for execution. The control_string is a character string which may contain substitution constructs and args are zero or more character string arguments. eof positions to the end of the current physical tape file, after the last record. fsf {N} forward space N files. If N is not specified, 1 is assumed. fsr {N} forward space N records. If N is not specified, 1 is assumed. help {topics} {-ca} prints information about request names or topics, where topics are the topics on which information is to be printed. if EXPR -then LINE1 {-else LINE2} conditionally executes one of two request lines depending on the value of an active string. EXPR is the active string which must evaluate to either "true" or "false". LINE1 is the rtq request line to execute if EXPR evaluates to "true" and LINE2 is the rtq request line to execute if EXPR evaluates to "false". list_help {topics}, lh {topics} displays the names of all subsystem info segments pertaining to a given set of topics. list_requests {STRs} {-ca}, lr {STRs} {-ca} prints a brief description of selected subsystem requests, where STRs specifies the requests to be listed. list_tape_contents {-long} {-label}, ltc {-lg} {-lbl} displays information about each record on the tape. The tape is positioned to BOT and each record is read in. If the tape is one of the five known standard types, the current record is inspected to determine if it is a valid label or trailer record; if so, information pertinent to that particular label or trailer record is displayed, in interpreted format. If the -long argument is used, the contents of the label record is displayed (in ASCII) as well. Otherwise, the length of the current record is compared to the length of the last record read. If the lengths are the same, a tally of the number of records with the same length is incremented. If the length of the current record is different from that of the last record, or if an end of file mark is detected, a message is displayed that includes: the number of records of equal length, and the record length in bits, words, 8-bit bytes, 9-bit bytes, and 6-bit characters. This display of record lengths can be circumvented by using the -label argument, which only displays the label records. This operation continues until the logical end of tape is reached (two end of file marks in succession or an end of volume trailer record, followed by an end of file mark). The tape is repositioned to BOT after the list_tape_contents request is complete. Use of the -label argument with unlabeled tapes is treated as an error. mode STR sets the hardware mode for reading tape to STR, which can be one of the following modes: bin, bcd, or nine. position, pos displays the current physical tape file and record position for the user. quit, q detaches the tape and returns control to the current command processor. read_file {args}, rdfile {args} 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 optional arguments associated with the read_file request are: -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. read_record {-count N}, rdrec {-ct N} reads the current record into a temporary buffer. If the tape is one of the five known standard labeled tapes, the record is checked to determine if it is a label or trailer record; if it is, information pertinent to that particular record type is displayed. Otherwise, information pertaining to the physical record length in bits, words, 8-bit bytes, 9-bit bytes, and 6-bit characters is displayed. When the -count argument is specified, N records are read, overlaying each other in the temporary buffer. Note that when read_record encounters a tape mark, it leaves you positioned at the beginning of the next file. ready, rdy prints a ready message. ready_off, rdf turns off printing of ready messages after execution of each subsystem request line. ready_on, rdn turns on printing of ready messages after execution of each subsystem request line. records_in_file, rif displays the total number of records in the current physical tape file. This operation reads each of the records in the file, repositions the tape to its original position, prior to this operation, and displays the count of records read. rewind, rew issues a rewind command and positions the tape to the beginning of tape (BOT) marker. subsystem_name prints the name of the subsystem; as an active request, [subsystem_name], returns the name of the subsystem. subsystem_version prints the version number of the subsystem; as an active request, [subsystem_version], returns the version number of the subsystem. Tape Positioning: When inspecting multifile tape reels, you may find the action of various positioning requests confusing. The table below illustrates the starting and ending position when using various tape positioning requests: Start Position Operation End Position file 6, record 7 rewind file 1, record 1 file 6, record 7 bof file 6, record 1 file 6, record 7 bsf file 5, record 1 file 6, record 7 fsf file 7, record 1 file 6, record 7 bsr file 6, record 6 file 6, record 7 fsr file 6, record 8 file 6, record 7 bsf 8 (1) file 1, record 1 file 6, record 7 bsr 10 (2) file 6, record 1 file 6, record 1 read_file -count 3 file 9, record 1 Note 1: This causes a rewind operation to occur, since the resultant file number would be less than one. Note 2: This causes a bof operation to occur, since the resultant record number would be less than one. Examples: A typical example of a read_tape_and_query invocation follows, including the initial information displayed for a labeled tape. read_tape_and_query usert1 Tape usert1,blk=2800 will be mounted with no write ring. Tape usert1,blk=2800 mounted on drive tape_02 with no write ring. Tape density is 1600 bpi Tape usert1 is a labeled ANSI tape Volume name recorded on tape label is USERT1 Setting tape dim to read in nine mode First data file format: ANSI HDR2 label record. Next file format: Record format DB; Block length 4000; Record length 4000; Mode ASCII; Positioning to beginning of physical tape file # 2, (logical file # 1) rtq: ----------------------------------------------------------- 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