1 09/20/87 read_tape_and_query, rtq
2
3
4 Syntax as a command: read_tape_and_query volume_id -control_args,
5 rtq volume_id -control_args
6
7
8 Function: Allows an user to interactively inspect and determine the
9 contents of a magnetic tape. Physical tape file processing
10 capabilities are also provided. Note that once the command is invoked,
11 you are placed in the read_tape_and_query subsystem where you may use
12 the read_tape_and_query requests. The read_tape_and_query requests are
13 listed below under "List of Requests".
14
15
16 Arguments:
17 volume_id
18 is the local tape library designation of the requested tape volume.
19
20
21 Control arguments:
22 -abbrev, -ab
23 enables abbreviation processing within read_tape_and_query. If this
24 argument is specified and the -profile control argument is not
25 given, then the user's default profile segment
26 >udd>Project_id>Person_id>Person_id.profile is used.
27 -block N, -bk N
28 specifies the maximum physical record size to be processed, where N
29 is the number of bytes. The default is 11200 bytes 2800 36-bit
30 words.
31 -comment STR, -com STR
32 displays STR as a message on the operators console at the time that
33 tape volume <volume_id> is mounted. If STR contains spaces, tabs or
34 special characters, the entire STR must be enclosed in quotes.
35
36
37 -density N, -den N
38 specifies the initial density setting for tape attachment, where N
39 is the number of bits per inch bpi. The default is 800 bpi.
40 Although the density is automatically determined see "Notes"
41 below, some tape subsystems may not have tape drives capable of
42 handling the default density.
43 -no_abbrev, -nab
44 specifies that abbreviation processing is not to be done by the
45 read_tape_and_query request processor. Default
46 -no_prompt
47 suppresses printing of the prompt character string "rtq:" for
48 read_tape_and_query requests.
49 -no_request_loop, nrql
50 doesn't enter the read_tape_and_query request loop.
51
52
53 -profile PATH, -pf PATH
54 specifies that abbreviation processing is to be done using PATH.
55 The suffix ".profile" need not be given, however, ".profile" must be
56 the last component of PATH. If this control argument is given then
57 the "-abbrev" control argument need not be given.
58 -prompt STR
59 changes the prompt for the read_tape_and_query request loop to STR.
60 If STR is a null string, "", then no prompt is given. Default is
61 to prompt with "rtq:".
62 -quit
63 exits after performing any operations specified by control
64 arguments. Default is to enter the read_tape_and_query request
65 loop.
66
67
68 -request STR, -rq STR
69 specifies an initial request line of STR is to be executed before
70 entering the read_tape_and_query request loop.
71 -request_loop, -rql
72 specifies that the read_tape_and_query request loop be entered.
73 Default.
74 -ring, -rg
75 specifies that the tape is to be mounted with a write ring. This
76 allows a tape that is already mounted with a write ring to be
77 attached without operator intervention. The default is to mount the
78 tape with no write ring.
79 -track N, -tk N
80 where N is 7 or 9 for 7 or 9 track tapes. If this control argument
81 is not specified, 9 track is assumed.
82
83
84 Notes: The read_tape_and_query command requests the specified tape
85 volume to be mounted. After the mount request has been satisfied,
86 read_tape_and_query automatically determines the tape density and
87 checks for a recorded tape label. If the density can be determined, an
88 informative message is displayed that includes the density. If the
89 tape has a standard Multics, GCOS, IBM, ANSI or CP5 tape label, an
90 informative message is displayed that includes the standard label type
91 and the recorded volume name. If the tape contains a valid IBM or ANSI
92 label, a second message is displayed informing the user of the physical
93 block size and logical record length in bytes of the first data file.
94 For all standard labeled tape volumes, the tape is then positioned to
95 the beginning of the first data file. If the tape label is not
96 recognized as one of the five standard types mentioned above, it is
97 designated as unlabeled and the tape volume is repositioned to the
98 beginning of the tape.
99
100
101 The read_tape_and_query command then goes into a request loop whose
102 requests are listed below.
103
104
105 List of requests:
106
107 ?
108 lists the available read_tape_and_query requests and active
109 requests.
110 abbrev -ca, ab -ca
111 turns abbreviation processor on or off and changes profile segments.
112 .
113 displays the command name read_tape_and_query with its short name
114 rtq in parentheses.
115 answer STR -ca request_line
116 provides preset answers to questions asked by another request.
117 bof
118 position to the beginning of the current physical tape file.
119 bsf N
120 backspace N files. If N is not specified, 1 is assumed.
121
122
123 bsr N
124 backspace N records. If N is not specified, 1 is assumed. bsr will
125 not cross backward to the previous file.
126 debug_mode -ca
127 enables or disables debugging mode for the rtq subsystem.
128 density N, den N
129 sets the tape density to N bits per inch bpi, where N can be 6250,
130 1600, 800, 556 or 200.
131 do request_string args
132 expands a request line by substituting the supplied arguments into
133 the line before execution, where request_string is a request line in
134 quotes and args are character string arguments that replace
135 parameters in request_string.
136
137
138 dump offset n_words char_types
139 displays the contents of the record buffer filled with the
140 read_record request on the users terminal. If no arguments are
141 specified, the contents of the entire tape buffer are displayed in
142 octal format.
143
144 The value of char_type can be selected from the following:
145
146 -ascii
147 displays the contents of the record buffer in octal with an ASCII
148 interpretation of the data on the right side.
149 -bcd
150 displays the contents of the record buffer in octal with a BCD
151 interpretation of the data on the right side
152 -ebcdic
153 displays the contents of the record buffer in octal with an
154 EBCDIC interpretation of the data on the right side.
155 -hex
156 displays the record buffer in hexadecimal format.
157
158 exec_com PATH STRs, ec PATH STRs
159 executes a program written in the exec_com language which is used to
160 pass request lines to the rtq subsystem and to pass input lines to
161 read_tape_and_query requests which read input. Where PATH is the
162 pathname of an exec_com program. ".rtq" suffix is assumed. STRs
163 are substituted for parameter references in the program.
164 execute LINE, e LINE
165 executes the supplied LINE as a Multics command line.
166 execute_string -ca control_string args,
167 exs -ca control_string args, exs
168 substitutes arguments into a control string. The expanded control
169 string is then passed to the command processor or the rtq subsystem
170 request processor for execution. The control_string is a character
171 string which may contain substitution constructs and args are zero
172 or more character string arguments.
173
174
175 eof
176 positions to the end of the current physical tape file, after the
177 last record.
178 fsf N
179 forward space N files. If N is not specified, 1 is assumed.
180 fsr N
181 forward space N records. If N is not specified, 1 is assumed.
182 help topics -ca
183 prints information about request names or topics, where topics are
184 the topics on which information is to be printed.
185
186
187 if EXPR -then LINE1 -else LINE2
188 conditionally executes one of two request lines depending on the
189 value of an active string. EXPR is the active string which must
190 evaluate to either "true" or "false". LINE1 is the rtq request line
191 to execute if EXPR evaluates to "true" and LINE2 is the rtq request
192 line to execute if EXPR evaluates to "false".
193 list_help topics, lh topics
194 displays the names of all subsystem info segments pertaining to a
195 given set of topics.
196 list_requests STRs -ca, lr STRs -ca
197 prints a brief description of selected subsystem requests, where
198 STRs specifies the requests to be listed.
199
200
201 list_tape_contents -long -label, ltc -lg -lbl
202 displays information about each record on the tape. The tape is
203 positioned to BOT and each record is read in. If the tape is one of
204 the five known standard types, the current record is inspected to
205 determine if it is a valid label or trailer record; if so,
206 information pertinent to that particular label or trailer record is
207 displayed, in interpreted format.
208
209
210 If the -long argument is used, the contents of the label record is
211 displayed in ASCII as well. Otherwise, the length of the current
212 record is compared to the length of the last record read. If the
213 lengths are the same, a tally of the number of records with the same
214 length is incremented. If the length of the current record is
215 different from that of the last record, or if an end of file mark is
216 detected, a message is displayed that includes: the number of
217 records of equal length, and the record length in bits, words, 8-bit
218 bytes, 9-bit bytes, and 6-bit characters.
219
220
221 This display of record lengths can be circumvented by using the
222 -label argument, which only displays the label records. This
223 operation continues until the logical end of tape is reached two
224 end of file marks in succession or an end of volume trailer record
225 followed by an end of file mark. The tape is repositioned to BOT
226 after the list_tape_contents request is complete. Use of the -label
227 argument with unlabeled tapes is treated as an error.
228 mode STR
229 sets the hardware mode for reading tape to STR, which can be one of
230 the following modes: bin, bcd, or nine.
231 position, pos
232 displays the current physical tape file and record position for the
233 user.
234
235
236 quit, q
237 detaches the tape and returns control to the current command
238 processor.
239
240
241 read_file args, rdfile args
242 reads the current tape file into the segment described by args. The
243 default action of this request with no arguments queries the user as
244 to the segment name he wishes the tape file to be read into and then
245 issues a warning telling the user that the current tape file will be
246 read in as a stream file with no conversion.
247 The optional arguments associated with the read_file request are:
248
249 -output_file STR, -of STR
250 where STR specifies the segment name for the tape file to be read
251 into. If STR is omitted, the user is queried for the segment
252 name.
253 -count N, -ct N
254 allows reading up to N files, or until logical end of tape is
255 encountered. After the first file is read in, the -count
256 iteration count is appended to the end of the user-designated
257 output file name as a second component. If N is not specified
258 for "-count" control argument then 1 is assumed. For example:
259
260 rdfile -ct 3 -of file1
261
262 names the first output file file1, the second file1.2, and the
263 third file1.3.
264 -multics, -mult
265 specifies that the input tape file is in Multics standard system
266 format. The data portion of each unrepeated record is written to
267 the specified stream output file. No attempt is made to separate
268 the contents of the physical record into a logical format. Since
269 standard Multics tape format specifies that an EOF mark be
270 written every 128 records, the "-extend" and "-count" arguments
271 should be used to ensure that all of the data is recovered.
272
273
274 -gcos, -gc
275 specifies that the input tape file is in GCOS standard system
276 format. That is, each record has a block control word and
277 several record control words dividing the physical record into
278 logical records. Each record is processed accordingly. BCD
279 records are converted to ASCII. ASCII records are copied
280 directly. Binary compressed deck card images are decompressed
281 and converted to ASCII. If a BCD card image is identified as a
282 "$ object" card, this card image and all successive binary card
283 images, until a "$ dkend" card image is identified, are copied to
284 a separate file whose name is formed from columns 73 - 76 of the
285 $ object card with a suffix of ".obj". If a BCD card image is
286 identified as a "$ snumb" card, this card and all following card
287 images, until another $ snumb card or end of file, are copied
288 into a file whose name is formed from columns 16 - 21 of the
289
290 $ snumb card with a suffix of ".imcv". If a BCD card image is
291 identified as a "$ <language>" card, this card and all following
292 card images, until another $ <language> card or end of file, are
293 copied into a file whose name is formed from columns 73 - 76 of
294 the $ <language> card with a suffix of ".ascii". This file is
295 also surrounded by sufficient GCOS "JCL cards" so that the
296 completed "deck" can be assembled using the Multics GCOS
297 Environment Simulator. If columns 73 - 76 of the $ <language>
298 card are blank, the $f <language> card image is displayed and the
299 user is queried for the filename.
300
301
302 -cp5
303 specifies that the input tape file is in CP5 standard system
304 format, which consists of variable length records, recorded in
305 EBCDIC. Each variable length logical record is written to the
306 specified stream file, with a newline character appended to the
307 end. The data read from the tape is automatically converted from
308 EBCDIC to ASCII.
309 -dec
310 specifies that the input tape file is in Digital Equipment
311 Corporation DEC standard system format. Each DEC word is 40
312 bits long, of which the first 32 bits and the last four bits are
313 concatenated to form one 36-bit word. The other four bits are
314 discarded. The converted data is then written onto the specified
315 file in raw format.
316
317
318 -ibm_vb STR
319 specifies that the input tape file has standard IBM VB-formatted
320 variable-length records with embedded block and control words.
321 STR can be ebcdic, ascii, or binary bin. Default: ebcdic
322 -ansi_db STR
323 specifies that the input tape file has ANSI-standard DB-formatted
324 variable-length records with embedded record control words. STR
325 can be ascii, ebcdic, or binary or bin. Default: ascii
326 -output_description, -ods
327 allows you to specify a standard Multics I/O attach description
328 to receive the tape file data. User queries ask you to input the
329 attach description and the opening mode. You can express opening
330 modes in long form or in abbreviation form e.g.
331 sequential_output sqo.
332
333
334 -extend
335 allows you to concatenate the contents of several tape files into
336 one output file. This control argument has meaning only if you
337 also specify -count.
338 -nnl
339 allows escape from the read_file default of appending a new line
340 character to the end of each physical record, when you give no
341 other format specification.
342 -truncate N, -tc N
343 allows you to truncate each physical record to a length of N
344 characters.
345 -skip N
346 allows you to skip N characters e.g. a record or block control
347 word at the beginning of the physical tape record. It is useful
348 when you are processing tapes of an unfamiliar format.
349
350
351 -logical_record_length N, -lrl N
352 allows you to divide each physical tape record into several
353 logical records of length N. Each logical record is written to
354 the specified file with a new line character appended to the end.
355 Logical records cannot span physical blocks.
356 -convert STR, -conv STR
357 allows you to convert the data format of each tape record, where
358 STR can be one of the following: ebcdic_to_ascii, ebcdic
359 converts input EBCDIC data to ASCII. bcd_to_ascii, bcd
360 converts input BCD data to ASCII. comp8_to_ascii, comp8
361 converts input comp8 four-bit-packed decimal data to its
362 equivalent ASCII representation.
363
364 read_record -count N, rdrec -ct N
365 reads the current record into a temporary buffer. If the tape is
366 one of the five known standard labeled tapes, the record is checked
367 to determine if it is a label or trailer record; if it is,
368 information pertinent to that particular record type is displayed.
369 Otherwise, information pertaining to the physical record length in
370 bits, words, 8-bit bytes, 9-bit bytes, and 6-bit characters is
371 displayed. When the -count argument is specified, N records are
372 read, overlaying each other in the temporary buffer. Note that when
373 read_record encounters a tape mark, it leaves you positioned at the
374 beginning of the next file.
375 ready, rdy
376 prints a ready message.
377
378
379 ready_off, rdf
380 turns off printing of ready messages after execution of each
381 subsystem request line.
382 ready_on, rdn
383 turns on printing of ready messages after execution of each
384 subsystem request line.
385 records_in_file, rif
386 displays the total number of records in the current physical tape
387 file. This operation reads each of the records in the file,
388 repositions the tape to its original position, prior to this
389 operation, and displays the count of records read.
390 rewind, rew
391 issues a rewind command and positions the tape to the beginning of
392 tape BOT marker.
393
394
395 subsystem_name
396 prints the name of the subsystem; as an active request,
397 subsystem_name, returns the name of the subsystem.
398 subsystem_version
399 prints the version number of the subsystem; as an active request,
400 subsystem_version, returns the version number of the subsystem.
401
402
403 Tape Positioning: When inspecting multifile tape reels, you may find
404 the action of various positioning requests confusing. The table below
405 illustrates the starting and ending position when using various tape
406 positioning requests:
407
408
409 Start Position Operation End Position
410
411 file 6, record 7 rewind file 1, record 1
412 file 6, record 7 bof file 6, record 1
413 file 6, record 7 bsf file 5, record 1
414 file 6, record 7 fsf file 7, record 1
415 file 6, record 7 bsr file 6, record 6
416 file 6, record 7 fsr file 6, record 8
417 file 6, record 7 bsf 8 1 file 1, record 1
418 file 6, record 7 bsr 10 2 file 6, record 1
419 file 6, record 1 read_file -count 3 file 9, record 1
420
421
422 Note 1: This causes a rewind operation to occur, since the resultant
423 file number would be less than one.
424
425
426 Note 2: This causes a bof operation to occur, since the resultant
427 record number would be less than one.
428
429
430 Examples:
431
432 A typical example of a read_tape_and_query invocation follows,
433 including the initial information displayed for a labeled tape.
434
435 read_tape_and_query usert1
436 Tape usert1,blk=2800 will be mounted with no write ring.
437 Tape usert1,blk=2800 mounted on drive tape_02 with no write ring.
438 Tape density is 1600 bpi
439 Tape usert1 is a labeled ANSI tape
440 Volume name recorded on tape label is USERT1
441 Setting tape dim to read in nine mode
442 First data file format:
443 ANSI HDR2 label record. Next file format:
444 Record format DB; Block length 4000; Record length 4000; Mode ASCII;
445 Positioning to beginning of physical tape file # 2,
446 logical file # 1
447 rtq: