1 08/22/83  tape_ibm_
   2 
   3 
   4 Function: The tape_ibm_ I/O module implements the processing of
   5 magnetic tape files in accordance with the standards established by
   6 the following IBM publications: "OS Data Management Services Guide",
   7 Release 21.7, GC26-3746-2; "IBM System 360 Disk Operating System Data
   8 Management Concepts", GC24-3427-8; and "OS Tape Labels", Release 21,
   9 GC28-6680-4.  These documents are collectively referred to below as
  10 the Standard.
  11 
  12 Entries in the module are not called directly by users; rather, the
  13 module is accessed through the I/O system.  See the Programmer's
  14 Reference Manual for a general description of the I/O system.
  15 
  16 
  17 Definition of Terms:
  18 record
  19    related information treated as a unit of information.
  20 block
  21    a collection of characters written or read as a unit.  A block may
  22    contain one or more complete records, or it may contain parts of one
  23    or more records.  A part of a record is a record segment.  A block
  24    does not contain multiple segments of the same record.
  25 file
  26    a collection of information consisting of records pertaining to a
  27    single subject.  A file may be recorded on all or part of a volume,
  28    or on more than one volume.
  29 
  30 
  31 volume
  32    a reel of magnetic tape.  A volume may contain one or more complete
  33    files, or it may contain sections of one or more files.  A volume
  34    does not contain multiple sections of the same file.
  35 file set
  36    a collection of one or more related files, recorded consecutively on
  37    a volume set.
  38 volume set
  39    a collection of one or more volumes on which one and only one file
  40    set is recorded.
  41 
  42 
  43 Syntax of Attach Description:
  44      tape_ibm_ vn1 vn2 ...  vnN {-control_args}
  45 
  46 
  47 Arguments:
  48 vni
  49    is a volume specification.  A maximum of 64 volumes may be
  50    specified.  In the simplest (and typical) case, a volume
  51    specification is a volume name that must be six characters or less
  52    in length.  If a volume name is less than six characters and
  53    entirely numeric, it is padded on the left with 0's.  If a volume
  54    name is less than six characters and not entirely numeric, it is
  55    padded on the right with blanks.  Occasionally, keywords must be
  56    used with the volume name.  For a discussion of volume name and
  57    keywords see "Volume Specification" below.
  58 
  59 
  60 vn1 vn2 ...  vnN
  61    comprise what is known as the volume sequence list.  The volume
  62    sequence list may be divided into two parts.  The first part, vn1
  63    ...  vni, consists of those volumes that are actually members of the
  64    volume set, listed in the order that they became members.  The
  65    entire volume set membership need not be specified in the attach
  66    description; however, the first (or only) volume set member MUST be
  67    specified, because its volume name is used to identify the file set.
  68    If the entire membership is specified, the sequence list may contain
  69    a second part, (vni+1) ...  vnN, consisting of potential members of
  70    the volume set, listed in the order that they may become members.
  71    These volumes are known as volume set candidates.  (See "Volume
  72    Switching" below.)
  73 
  74 
  75 Control arguments:
  76    A control argument can appear only once.
  77 -block B, -bk B
  78    specifies the block length in characters, where 20<=B<32760 and
  79    mod(B,4)=0 if open for sequential output.  The value of B is
  80    dependent upon the value of R specified in the -record control
  81    argument.  (See "Creating A File" below.)
  82 -clear, -cl
  83    specifies that internal information on a file-set which the I/O
  84    module retains from previous attachments is to be deleted.  This
  85    control argument can be used when it is desired to change attributes
  86    of a file-set which are maintained across attachments for a given
  87    process, e.g.  density or label standard.  For the initial
  88    attachment to a file-set in a given process, this control argument
  89    has no effect.
  90 -comment STR
  91    specifies that a given message is to be displayed on the operator's
  92    console whenever a certain volume is mounted.  (See Volume
  93    Specification"  below.)  STR can be 64 characters or less in
  94    length.
  95 
  96 
  97 -create, -cr
  98    specifies that a new file is to be created.  (See "Creating A File"
  99    below.)
 100 -density N, -den N
 101    specifies the density at which the file set is recorded, where N can
 102    be 800, 1600, or 6250 bits per inch.  (See "File Set Density"
 103    below.)
 104 -device N, -dv N
 105    specifies the maximum number of tape drives that can be used during
 106    an attachment, where N is an integer in the range 1 <= N <= 63.
 107    (See "Multiple Devices" below.)
 108 -dos
 109    specifies that a file was produced by, or is destined for, a DOS
 110    installation.  (See "DOS Files" below.)
 111 
 112 
 113 -expires date, -exp date
 114    specifies the expiration date of the file to be created or generated
 115    where date must be of a form acceptable to the
 116    convert_date_to_binary_ subroutine.  (See "File Expiration" below.)
 117 -extend, -ext
 118    specifies extension of an existing file.  (See "Extending a File"
 119    below.)
 120 -force, -fc
 121    specifies that the expiration date of the file being overwritten is
 122    to be ignored.  (See "File Expiration" below.)
 123 -format F, -fmt F
 124    specifies the record format, where F is a format code:  fb, f, vb,
 125    v, vbs, vs, or U.  (See "Creating A File" below for a description
 126    of format codes.)
 127 
 128 
 129 -mode STR, -md STR
 130    specifies the encoding mode used to record the file data, where STR
 131    is the string ebcdic, ascii, or binary; the default is ebcdic.  (See
 132    "Encoding Mode" below.)
 133 -modify, -mod
 134    specifies modification of an existing file.  (See "Modifying a File"
 135    below.)
 136 -name STR, -nm STR
 137    specifies the file identifier of the file, where STR is from 1 to 17
 138    characters.  (See "File Identifiers" below.)
 139 -no_labels, -nlb
 140    specifies that unlabeled tapes are to be processed.  (See "Unlabeled
 141    Tapes" below.)
 142 
 143 
 144 -number N, -nb N
 145    specifies the file sequence number, the position of the file within
 146    the file set, where N is an integer in the range 1 <= N <= 9999.
 147    (See "Creating A File" below.)
 148 -record R, -rec R
 149    specifies the record length in characters, where R must be in the
 150    range 1<=R<1044480.  The value of R is dependent upon the choice of
 151    record format.  (See "Creating A File" below.)
 152 -replace STR, -rpl STR
 153    specifies the file identifier of the file to be replaced, where STR
 154    must be from 1 to 17 characters.  If no file with file identifier
 155    STR exists, an error is indicated.  (See "Creating A File" below.)
 156 
 157 
 158 -retain STR, -ret STR
 159    specifies retention of resources across attachments, where STR
 160    specifies the detach-time resource disposition:  All or none.
 161    (See "Resource Disposition" below.)
 162 -ring, -rg
 163    specifies that the volume set be mounted with write rings.  (See
 164    "Write Rings and Write Protection" below.)
 165 -speed S1{,S2,...,SN}, -ips S1{,S2,...,SN}
 166    specifies desired tape drive speeds in inches per second, where Si
 167    can be 75, 125, or 200 inches per second.  (See "Device Speed
 168    Specification" below.)
 169 -volume vni
 170    specifies a volume name beginning with a hyphen (-) to distinguish
 171    it from a control argument.
 172 
 173 
 174 File Identifiers:
 175 Associated with every file is a name (file identifier) and a number
 176 (file sequence number).  The file identifier must be 17 characters or
 177 less.  When creating a file, the file identifier must be composed of
 178 one or more components of one to eight characters, with adjacent
 179 components separated by a period.  The first character of each
 180 component must be an uppercase letter or national character (@, #, or
 181 $) and the remaining characters must be uppercase letters, national
 182 characters or the digits 0 to 9.  If a file identifier (of an existing
 183 file) does not meet the naming conventions established for files
 184 created on the Multics system, the file must be referenced using the
 185 -number control argument and a file sequence number.
 186 
 187 
 188 Creating a File:
 189 When a file is created, an entirely new entity is added to the file
 190 set.  There are two modes of creation:  append and replace.  In append
 191 mode, the new file is added to the file set immediately following the
 192 last (or only) file in the set.  The process of appending does not
 193 alter the previous contents of the file set.  In replace mode, the new
 194 file is added by replacing (overwriting) a particular previously
 195 existing file.  The replacement process logically truncates the file
 196 set at the point of replacement, destroying all files (if any) that
 197 follow consecutively from that point.
 198 
 199 The -create and -name STR control arguments are required to create a
 200 file, where STR is the file identifier.  If no file having file
 201 identifier STR exists in the file set, the new file is appended to the
 202 file set; otherwise, the new file replaces the old file of the same
 203 name.
 204 
 205 
 206 If the user wishes to explicitly specify creation by replacement, the
 207 particular file to be replaced must be identified.  Either a file
 208 identifier or a file sequence number is sufficient to uniquely identify
 209 a particular file in the file set.  The -number and -replace control
 210 arguments either separately or in conjunction, are used to specify the
 211 file to be replaced.  If used together, they must both identify the
 212 same file; otherwise, an error is indicated.
 213 
 214 When the -number control argument is specified, if N is less than or
 215 equal to the sequence number of the last file in the file set, the
 216 created file replaces the file having sequence number N.  If N is one
 217 greater than the sequence number of the last file in the file set, the
 218 created file is appended to the file set.  If N is any other value, an
 219 error is indicated.  When creating the first file of an entirely new
 220 file set, the -number control argument must be explicitly specified.
 221 (See "Volume Initialization" below.)
 222 
 223 
 224 The -format, -record and -block control arguments are used to specify
 225 the internal structure of the file to be created.  They are
 226 collectively known as structure attribute control arguments.  When the
 227 -format control argument is used, F must be one of the following format
 228 codes, chosen according to the nature of the data to be recorded.  (For
 229 a detailed description of the various record formats, see "Record
 230 Formats" below.)
 231 
 232 fb  for fixed-length records.
 233     Used when every record has the same length, not in excess of 32760
 234     characters.
 235 vb  for variable-length records.
 236     Used when records are of varying lengths, the longest not in excess
 237     of 32752 characters.
 238 
 239 
 240 vbs for spanned records.
 241 
 242    Used when the record length is fixed and in excess of 32760
 243    characters, or variable and in excess of 32752 characters.  In
 244    either case, the record length cannot exceed 1,044,480 characters.
 245    (See "DOS Files" below.)
 246 
 247 f  for fixed-length records, unblocked.
 248 v  for variable-length records, unblocked.
 249 vs for spanned records, unblocked.
 250    (See "DOS Files" below.)
 251 
 252    NOTE:  Because of padding requirements records recorded using vs
 253    format may be irreversibly modified.  (See "Padding" below.)
 254 
 255 
 256 Unblocked means that each block contains only one record (f, v) or
 257 record segment (vs).  Because of their relative inefficiency, the use
 258 of unblocked formats in general is discouraged.  Blocked means that
 259 each block contains as many records (fb, vb) or record segments (vbs)
 260 as possible.  The actual number of records/block is either fixed (fb),
 261 depending upon the block length and record length, or variable (vb,
 262 vbs), depending upon the block length, record length, and actual
 263 records.
 264 
 265 u  for undefined records.
 266    U format records are undefined in format.  Each block is treated as
 267    a single record, and a block may contain a maximum of 32760
 268    characters.
 269 
 270 
 271 When the -record control argument is used, the value of R is dependent
 272 upon the choice of record format.  In the following list, amrl is the
 273 actual or maximum record length.
 274 
 275      F = fb | f:    R = amrl
 276      F = vb | v:    amrl + 4 <= R <= 32756
 277      F = vbs | vs:  amrl <= R <= 1044480
 278      F = u:         R is undefined
 279                     (the -record control argument should not be used.)
 280 
 281 
 282 When the -block control argument is used, the value of B is dependent
 283 upon the value of R.  When the block length is not constrained to a
 284 particular value, the largest possible block length should be used.
 285      F = fb:        B must satisfy mod (B,R) = 0
 286      F = f:         B = R
 287      F = vb:        b >= R + 4
 288      F = v:         B = R + 4
 289      F = vbs | vs:  20 <= B <= 32760
 290      F = u:         amrl <= B <= 32760
 291 In every case, B must be an integer in the range 20 <= B <= 32760, and,
 292 when the I/O switch is opened for sequential_output, must satisfy mod
 293 (B,4) = 0.
 294 
 295 Since the structure attribute control arguments are interdependent,
 296 care must be taken to ensure that specified values are consistent.
 297 
 298 
 299 Padding:
 300 Since the Multics system is implemented on word-oriented hardware,
 301 records recorded in any format are subject to block and/or record
 302 padding.  On output, the hardware requires that the number of
 303 characters in a block be evenly divisible by 4; i.e., only words can be
 304 written.  The I/O module therefore requires that mod (B,4) = 0, and
 305 pads a record, if necessary, to meet this requirement.  (Warning:  this
 306 padding may cause IBM-system rejection of a block if block length is
 307 not a multiple of the record length.)
 308 
 309 
 310 The following rules govern padding on output:
 311 
 312 F = fb:   if iobl (the I/O buffer length in an iox_$write_record call;
 313           i.e., the number of characters to be written) is less than R,
 314           the record is padded on the right with blanks to length R.
 315           The last (or only) record of the file may be padded on the
 316           right with N blanks, where 0 <= N <= 19 is sufficient to
 317           satisfy B >= 20, and mod (B,4) = 0.
 318 
 319 F = f:    if iobl is less than R, the record is padded on the right
 320           with blanks to length R.  Because the specified value of B
 321           must satisfy B >= 20, mod (B,4) = 0, and R = B, there are no
 322           other padding possibilities.
 323 
 324 
 325 F = vb:   the last (or only) record in every block is padded on the
 326           right with N blanks, where 0 <= N <= 12 is sufficient to
 327           satisfy B >= 20, and mod (B,4) = 0.  Because the number of
 328           records in a block is variable, it is difficult to determine
 329           which records of a file are padded, if any.
 330 
 331 F = v:    every record is padded on the right with N blanks, where
 332           0 <= N <= 12 is sufficient to satisfy B >= 20, and mod
 333           (B,4) = 0.
 334 
 335 F = vbs:  the last (or only) record of the file is padded on the right
 336           with N blanks, where 0 <= N <= 12 is sufficient to satisfy
 337           B >= 20, and mod (B,4) = 0.
 338 
 339 
 340 F = vs:   every record or record segment is padded on the right with N
 341           blanks, where 0 <= N <= 12 is sufficient to satisfy B >= 20,
 342           and mod (B,4) = 0.
 343 
 344 NOTE:  This requirement can result in an indeterminate number of blanks
 345 being inserted into a record at one or more indeterminate positions.
 346 
 347 F = u:    every record is padded on the right with N blanks, where
 348           0 <= N <= 12 is sufficient to satisfy B >= 20, and mod
 349           (B,4) = 0.
 350 
 351 
 352 Reading A File:
 353 The attach description needed to read a file is less complex than the
 354 description used to create it.  When a file is initially created by the
 355 I/O module, the structure attributes specified in the attach
 356 description are recorded in the file's header and trailer labels.
 357 These labels, that precede and follow each file section, also contain
 358 the file name, sequence number, block count, etc.  Files created by OS
 359 installations also record the structure attributes in the file labels.
 360 (See "DOS Files" below.)  When a file is subsequently read, all this
 361 information is extracted from the labels.  Therefore, the attach
 362 description need only identify the file to be read; no other control
 363 arguments are necessary.
 364 
 365 
 366 The file can be identified using the -name control argument, the
 367 -number control argument, or both in combination.  If the -name control
 368 argument is used, a file with the specified file identifier must exist
 369 in the file set; otherwise, an error is indicated.  If the -number
 370 control argument is used, a file with the specified file sequence
 371 number must exist in the file set; otherwise, an error is indicated.
 372 If the -name and -number control arguments are used together, they must
 373 both refer to the same file; otherwise, an error is indicated.
 374 
 375 
 376 DOS Files:
 377 Files created by DOS installations differ from OS files in one major
 378 respect -- DOS does not record HDR2 labels, which contain the structure
 379 attributes.  It is therefore necessary to specify all of the structure
 380 attributes whenever a file created by a DOS installation is to be
 381 processed.
 382 
 383 It is further necessary to distinguish between OS and DOS files
 384 recorded in VBS or VS format.  The segment descriptor word (SDW) of a
 385 zero-length DOS spanned record has a high-order null record segment bit
 386 set, while a zero-length OS spanned record does not.  (See "V(B)S
 387 Format" below, for an explanation of the SDW.)
 388 
 389 The -dos control argument must be used when writing a VBS or VS file
 390 destined for a DOS installation, or when reading a VBS or VS file
 391 written by a DOS installation.  In the interest of clarity, however, it
 392 is recommended that the control argument always be specified when DOS
 393 files are processed, regardless of record format.
 394 
 395 
 396 Output Operations On Existing Files:
 397 There are two output operations that can be performed on an already
 398 existing file:  extension and modification.  As their functions are
 399 significantly different, they are described separately below.  They do,
 400 however, share a common characteristic.  Like the replace mode of
 401 creation, an output operation on an existing file logically truncates
 402 the file set at the point of operation, destroying all files (if any)
 403 that follow consecutively from that point.  Because the block length is
 404 constrained to mod(B,4) = 0 for output operations, a file whose block
 405 length does not satisfy this criterion cannot be extended or modified.
 406 
 407 
 408 Extending A File:
 409 It is often necessary to add records to a file without in any way
 410 altering the previous contents of the file.  This process is known as
 411 extension.
 412 
 413 Because all the information regarding structure, length, etc., can be
 414 obtained from the file labels, the attach description need only specify
 415 that an extend operation is to be performed on a particular file.  (See
 416 "DOS Files" above.)  If the file to be extended does not exist, an
 417 error is indicated.  New data records are appended at the end of the
 418 file; the previous contents of the file remain unchanged.
 419 
 420 
 421 The file to be extended is identified using the -name control argument,
 422 the -number control argument, or both in combination.  The same rules
 423 apply as for reading a file.  (See "Reading a File" above.)
 424 
 425 The user may specify any or all of the structure attribute control
 426 arguments when extending a file.  The specified control arguments are
 427 compared with their recorded counterparts; if a discrepancy is found,
 428 an error is indicated.
 429 
 430 
 431 Modifying A File:
 432 It is occasionally necessary to replace the entire contents of a file,
 433 while retaining the structure of the file itself.  This process is
 434 known as modification.
 435 
 436 Because all necessary information can be obtained from the file labels,
 437 the attach description need only specify that a modify operation is to
 438 be performed on a particular file.  (See "DOS Files" above.)  If a file
 439 to be modified does not exist, an error is indicated.  The entire
 440 contents of the file are replaced by the new data records.
 441 
 442 The file to be modified is identified using the -name control argument,
 443 the -number control argument, or both in combination.  The same rules
 444 apply as for reading a file.  (See "Reading a File" above.)
 445 
 446 If any or all of the structure attribute control arguments are
 447 specified, they must match their recorded counterparts; otherwise, an
 448 error is indicated.
 449 
 450 
 451 Encoding Mode:
 452 The I/O module makes provision for three data encoding modes:  EBCDIC,
 453 binary, and ASCII.  The default data encoding mode is EBCDIC.  File
 454 labels are always recorded using the EBCDIC character set.
 455 
 456 When a file is created, the -mode control argument can be used to
 457 explicitly specify the encoding mode (if not used, the
 458 list_tape_contents command does not supply the specific mode in its
 459 report).
 460 
 461 
 462 If STR is the string ascii, the octal values of the characters to be
 463 recorded must be in the range 000 <= octal_value <= 377; otherwise, an
 464 unrecoverable I/O error occurs.  If STR is the string ebcdic, the octal
 465 values of the characters to be recorded must be in the range
 466 000 <= octal_value <= 177.  (See the ascii_to_ebcdic_ subroutine for
 467 the specific ASCII to EBCDIC mapping used by the I/O module.)  If STR
 468 is the string binary, any 9-bit byte value can be recorded.  However,
 469 data written on IBM equipment with binary mode may not be compatible
 470 with Multics, or vice versa.
 471 
 472 Because the data encoding mode is not recorded in the file labels, the
 473 -mode ascii and the -mode binary control arguments must always be
 474 specified when subsequently processing an ASCII or binary file,
 475 respectively.
 476 
 477 
 478 File Expiration:
 479 Associated with every file is a file expiration date, recorded in the
 480 file labels.  If a file consists of more than one file section, the
 481 same date is recorded in the labels of every section.  A file is
 482 regarded as "expired" on a day whose date is later than or equal to the
 483 expiration date.  Only when this condition is satisfied can the file
 484 (and by implication, the remainder of the file set) be overwritten.
 485 Extension, modification, and the replace mode of creation are all
 486 considered to be overwrite operations.
 487 
 488 The expiration date is recorded in Julian form; i.e., yyddd, where yy
 489 are the last two digits of the year, and ddd is the day of the year
 490 expressed as an integer in the range 1 <= ddd <= 366.  A special case
 491 of the Julian date form is the value "00000", which means always
 492 expired.
 493 
 494 
 495 The expiration date is set only when a file is created.  Unless a
 496 specific date is provided, the default value "00000" is used.  The
 497 -expires control argument is used to specify an expiration date where
 498 date must be of a form acceptable to the convert_date_to_binary_
 499 subroutine; the date may be quoted and contain embedded spaces; Julian
 500 form, including "00000", is unacceptable.  Because overwriting a file
 501 logically truncates the file set at the point of overwriting, the
 502 expiration date of a file must be earlier than or equal to the
 503 expiration date of the previous file (if any); otherwise, an error is
 504 indicated.
 505 
 506 If an attempt is made to overwrite an unexpired file, the user is
 507 queried for explicit permission.  (See "Queries" below).  The -force
 508 control argument unconditionally grants permission to overwrite a file
 509 without querying the user, regardless of "unexpired" status.
 510 
 511 
 512 Volume Specification:
 513 The volume name (also called the slot identifier) is an identifier
 514 physically written on, or affixed to, the reel or container of the
 515 volume.  The volume identifier is a six-character identifier
 516 magnetically recorded in the first block of the volume, the VOL1 label.
 517 This implementation of the I/O module assumes the volume name and
 518 volume identifier to be identical.  If this is not the case, the volume
 519 identifier must be used in the volume specification field of the attach
 520 description.
 521 
 522 If a volume name begins with a hyphen (-), the -volume keyword must
 523 precede the volume name.  Even if the volume name does not begin with a
 524 hyphen, it may still be preceded by the -volume keyword.  The volume
 525 specification has the following form:
 526         -volume vni
 527 
 528 
 529 Occasionally, it is necessary for a user to communicate some additional
 530 information to the operator in connection with a mount request.  This
 531 can be done through the use of the -comment control argument:
 532         vni -comment STR
 533    or:
 534         -volume vni -comment STR
 535 where the -comment STR keyword and text specify that a given message is
 536 to be displayed on the operator's console whenever volume vni is
 537 mounted (a comment can be specified after each volume name supplied).
 538 STR can be from 1 to 64 characters.  STR must be quoted if it contains
 539 embedded spaces.
 540 
 541 
 542 Volume Switching:
 543 The Standard defines four types of file set configurations:
 544 
 545     single-volume file
 546            a single file residing on a single volume.
 547     multivolume file
 548             a single file residing on multiple volumes.
 549     multifile volume
 550             multiple files residing on a single volume.
 551     multifile multivolume
 552             multiple files residing on multiple volumes.
 553 
 554 
 555 The I/O module maintains a volume sequence list on a per-file-set
 556 basis, for the life of a process.  A minimal volume sequence list
 557 contains only one volume, the first (or only) volume set member.  If
 558 the file set is a multivolume configuration, the sequence list may
 559 contain one or more of the additional volume set members, following the
 560 mandatory first volume.  If the sequence list contains the entire
 561 volume set membership (which may be only one volume), it may then
 562 contain one or more volume set candidates.  Volume set candidates can
 563 become volume set members only as the result of an output operation.
 564 When an output operation causes the amount of data in the file set to
 565 exceed the capacity of the current volume set membership, the first
 566 available volume set candidate becomes a volume set member.
 567 
 568 
 569 When the first attachment to any file in a file set is made, the volume
 570 sequence list for the file set is initialized from the attach
 571 description.  At detach time, the I/O module empirically determines
 572 that one or more volumes are volume set members, by virtue of having
 573 used them in the course of processing the attached file.  The remaining
 574 volumes in the sequence list, if any, are considered to be candidates.
 575 In subsequent attachments to any file in the file set, the order of
 576 volumes specified in the attach description is compared with the
 577 sequence list.  For those volumes that the I/O module knows to be
 578 volume set members, the orders must match; otherwise, an error is
 579 indicated.  Those volumes in the sequence list that the I/O module
 580 considers to be candidates are replaced by attach description
 581 specifications, if the orders differ.  If the attach description
 582 contains more volumes than the sequence list, the additional volumes
 583 are appended to the list.  This implementation maintains and validates
 584 the volume set membership on a per-process basis, and maintains a list
 585 of volume set candidates that is alterable on a per-attach basis.
 586 
 587 
 588 Once a volume sequence list exists, subsequent attachments to files in
 589 the file set do not require repeated specification of any but the first
 590 (or only) volume, which is used to identify the file set.  If the I/O
 591 module detects physical end of tape in the course of an output
 592 operation, it prepares to switch to the next volume in the volume set.
 593 An attempt is made to obtain the volume name from the sequence list,
 594 either from the sublist of members, or the sublist of candidates.  If
 595 the list of volume set members is exhausted, and the list of candidates
 596 is either empty or exhausted, the user is queried for permission to
 597 terminate processing.  If the reply is negative, the I/O module queries
 598 for the volume name of the next volume, which becomes a volume set
 599 member and is appended to the volume sequence list.  If a volume name
 600 is obtained by either method, volume switching occurs, and processing
 601 of the file continues.
 602 
 603 
 604 If the I/O module reaches end-of-file section (but not of file) in the
 605 course of an input operation, it first attempts to obtain the next
 606 volume name from the volume sequence list.  No distinction is made
 607 between the member and candidate sublists, because a volume that ends
 608 with a file section must be followed by the volume that contains the
 609 next section.  If the sequence list is exhausted, the user is queried
 610 as described above.  If either of these methods results in a volume
 611 name, volume switching occurs and processing of the file continues.
 612 
 613 If the volume set is demounted at detach time, all volume set
 614 candidates are purged from the volume sequence list.
 615 
 616 
 617 Multiple Devices:
 618 If a volume set consists of more than one volume, the -device control
 619 argument can be used to control device assignment, where N specifies
 620 the maximum number of tape drives that can be used during this
 621 attachment (N is an integer in the range 1 <= N <= 63).  Drives are
 622 assigned only on a demand basis, and in no case does the number
 623 actually assigned exceed the device limit of the process.  The default
 624 for an initial attachment to a file in a file set is N equals 1; the
 625 default for a subsequent attachment to that file or any other in the
 626 file set equals the previous value of N.
 627 
 628 
 629 File Set Density:
 630 The I/O module makes provision for three densities:  800, 1600, and
 631 6250 bpi (bits per inch).  Every file in a file set must be recorded at
 632 the same density; otherwise, an error is indicated.
 633 
 634 The -density control argument is used to explicitly specify the file
 635 set density, where N specifies the density at which the file set is (to
 636 be) recorded (N can be 800, 1600, and 6250 bpi).  The file set density
 637 can only be changed in a subsequent attachment if the volume set was
 638 demounted by the previous attach.
 639 
 640 In the absence of a -density control argument, the file set density is
 641 determined as follows:
 642      open for input:  N = density of VOL1 label
 643      open for output, creating new file set:  N = 1600 bpi
 644      open for output, old file set: N = density of VOL1 label
 645 
 646 
 647 Device Speed Specification:
 648 The -speed control argument is used to specify acceptable tape device
 649 speeds in inches per second.  The module only attaches a device that
 650 matches a speed specified by this control argument.  If more than one
 651 speed is specified, the module attaches a device that matches one of
 652 the speeds.  If more than one device is attached, and more than one
 653 speed is specified, the devices will not necessarily all be of the same
 654 speed.
 655 
 656 
 657 Opening:
 658 The opening modes supported are sequential_input and sequential_output.
 659 An I/O switch can be opened and closed any number of times in the
 660 course of a single attachment.  Such a series of openings may be in
 661 either or both modes, in any valid order.
 662 
 663 All openings during a single attachment are governed by the same attach
 664 description.  The following control arguments, all of which pertain to
 665 output operations, are ignored when the switch is opened for
 666 sequential_input:
 667      -create    -force
 668      -expires   -modify
 669      -extend    -replace
 670 
 671 
 672 Resource Disposition:
 673 The I/O module utilizes two types of resources:  devices (tape drives),
 674 and volumes.  Once an I/O switch is attached, resources are assigned to
 675 the user's process on a demand basis.  When the I/O switch is detached,
 676 the default resource disposition unassigns all devices and volumes.
 677 
 678 If several attaches and detaches to a file set are made in a process,
 679 repeated assignment and unassignment of resources is undesirable.
 680 Although the processing time required to assign and unassign a device
 681 is small, all available devices can be assigned to other processes in
 682 the interval between one detach and the next attach.  While volumes are
 683 not often "competed" for, mounting and demounting is both
 684 time-consuming and expensive.
 685 
 686 
 687 The -retain control argument is used to specify retention of resources
 688 across attachments, where STR specifies the detach-time resource
 689 disposition.  If STR is the string all, all devices and volumes remain
 690 assigned to the process.  If STR is the string none, all devices and
 691 volumes are unassigned.  This is the default retention.
 692 
 693 The I/O module provides a further means for specifying or changing the
 694 resource disposition subsequent to attachment.  If retention of any
 695 devices or volumes has been specified at or subsequent to attach time
 696 using the retention control operation, the unassign_resource command
 697 cannot be used.  Instead, use the retain_none or retention -none
 698 control operation before detaching the I/O module.  (See the retention,
 699 retain_none, retain_all operations under "Control Operations" below.)
 700 
 701 
 702 Write Rings And Write Protection:
 703 Before a volume can be written on, a write ring (an actual plastic
 704 ring) must be manually inserted into the reel.  This can only be done
 705 before the volume is mounted on a device.  When a volume is needed, the
 706 I/O module sends the operator a mount message that specifies if the
 707 volume is to be mounted with or without a ring.
 708 
 709 If the attach description contains any of the output control arguments
 710 (-extend, -modify, or -create), volumes are mounted with rings;
 711 otherwise, they are mounted without rings.  When a volume set mounted
 712 with rings is opened for sequential_input, hardware file protect is
 713 used to inhibit any spurious write operations.  A volume set mounted
 714 without rings cannot be opened for sequential_output.
 715 
 716 
 717 However, the following sequence of events is possible.  An attach
 718 description contains none of the output control arguments, but does
 719 contain the "-retain all" control argument.  The volume set is mounted
 720 without rings.  After one or more (or no) openings for
 721 sequential_input, the I/O switch is detached.  The volume set remains
 722 mounted because of the "-retain all" control argument.  Subsequently,
 723 an attach is made whose description contains an output control
 724 argument, which requires that the volume set be mounted with rings.
 725 However, as rings can only be inserted in a demounted volume, the
 726 entire volume set must be demounted and then remounted.
 727 
 728 
 729 This situation can be avoided by using the -ring (-rg) control argument
 730 to specify that the volume set be mounted with write rings.  If no
 731 output control argument is specified in conjunction with -ring, the I/O
 732 switch cannot be opened for sequential_output.
 733 
 734 When a volume set is mounted with write rings and the I/O switch is
 735 opened for sequential_input, the hardware file protect feature is used
 736 to safeguard the file set.
 737 
 738 
 739 Queries:
 740 Under certain exceptional circumstances, the I/O module queries the
 741 user for information needed for processing to continue or instructions
 742 on how to proceed.
 743 
 744 Querying is performed by the command_query_ subroutine.  The user may
 745 intercept one or more types of query by establishing a handler for the
 746 command_question condition, which is signalled by the command_query_
 747 subroutine.  Alternately, the answer command can be used to intercept
 748 all queries.  The use of a predetermined "yes" answer to any query
 749 causes those actions to be performed that attempt to complete an I/O
 750 operation without human intervention.
 751 
 752 
 753 In the following list of queries, status_code refers to
 754 command_question_info.status_code.  See the Programmer's Reference
 755 Manual for information regarding the command_question condition and the
 756 command_question_info structure.
 757 
 758 status_code = error_table_$file_aborted
 759    This can occur only when the I/O switch is open for
 760    sequential_output.  The I/O module is unable to correctly write file
 761    header labels, trailer labels, or tapemarks.  This type of error
 762    invalidates the structure of the entire file set.  Valid file set
 763    structure can only be restored by deleting the defective file or
 764    file section from the file set.
 765 
 766    The user is queried for permission to delete the defective file or
 767    file section.  If the response is "yes", the I/O module attempts
 768    deletion.  The attempt may or may not succeed; the user is informed
 769    if the attempt fails.  If the response is "no", no action is taken.
 770    The user is probably unable to subsequently process the file, or
 771    append files to the file set; however, this choice permits retrieval
 772    of the defective file with another I/O module.  In either case, the
 773    I/O switch is closed.
 774 
 775 
 776 status_code = error_table_$unexpired_volume
 777    This can occur only when the I/O switch is open for
 778    sequential_output.  A volume must be either reinitialized or
 779    overwritten; however, the first file or file section on the volume
 780    is unexpired.
 781 
 782    The user is queried for permission to initialize or overwrite the
 783    unexpired volume.  If the response is "yes", the volume is
 784    initialized or overwritten and processing continues.  If the
 785    response is "no", further processing cannot continue, and the I/O
 786    switch is closed.
 787 
 788 
 789 status_code = error_table_$uninitialized_volume
 790    A volume requires reinitialization or user verification before it
 791    can be used to perform any I/O.  The I/O module distinguishes among
 792    four causes by setting command_question_info.query_code as follows:
 793    query_code = 1
 794       the first block of the tape is unreadable.  The tape is either
 795       defective, or recorded at an invalid density.  This query code
 796       can occur only if the I/O stream is opened for sequential_output.
 797    query_code = 2
 798       the first block of the tape is not a valid IBM VOL1 label.  The
 799       tape is not formatted as an IBM SL volume.  This query code can
 800       occur only if the I/O stream is opened for sequential_output.
 801 
 802 
 803    query_code = 3
 804       the volume identifier recorded in the VOL1 label is incorrect.
 805       The volume identifier does not match the volume name.
 806    query_code = 4
 807       the density at which the volume is recorded is incorrect.  The
 808       volume density does not match the specified density.  This query
 809       code can occur only if the I/O stream is opened for
 810       sequential_output.
 811 
 812    If the response is "yes", processing continues.  If the response is
 813    "no", further processing cannot continue, and the I/O switch is
 814    closed.
 815 
 816 
 817 status_code = error_table_$unexpired_file
 818    This can occur only when the I/O switch is open for
 819    sequential_output.  A file that must be extended, modified, or
 820    replaced is unexpired.
 821 
 822    The user is queried for permission to overwrite the unexpired file.
 823    If the response is "yes", processing continues.  If the response is
 824    "no", further processing cannot continue, and the I/O switch is
 825    closed.
 826 status_code = error_table_$no_next_volume
 827    This can occur when reading a multivolume file, or when writing a
 828    file and reaching physical end of tape.  The I/O module is unable to
 829    determine the name of the next volume in the volume set.
 830 
 831    The user is queried for permission to terminate processing.  If the
 832    response is "yes", no further processing is possible.  If the I/O
 833    switch is open for sequential_output, the I/O switch is closed.  If
 834    the response is "no", the user is queried for the volume name of the
 835    next volume.  (See status_code = 0 below.)
 836 
 837 
 838 status_code = 0
 839    This occurs only when the response to the above query is "no".  The
 840    user is requested to supply the name of the next volume.  The
 841    response must be a volume name 6 characters or less in length,
 842    optionally followed by a mount message.  Even if the volume name
 843    begins with a hyphen, it must NOT be preceded by the -volume control
 844    argument.  If a mount message is to be specified, the response takes
 845    the following form:
 846            volume_name -comment STR
 847    where STR is the mount_message and need not be a contiguous string.
 848    See "Volume Specification" above.  This is the only query that does
 849    not require a "yes" or "no" response.  If a preset "yes" is supplied
 850    to all queries, this particular query never occurs.
 851 
 852 
 853 Structure Attribute Defaults:
 854 When a file is created, the I/O module can supply a default value for
 855 any or all of the file structure attributes.  The defaults used are as
 856 follows:
 857 
 858 1.   record format - the default is F = vb
 859 2.   block length - the default is B = 8192
 860 3.   record length -
 861      F = u:  undefined
 862      F = fb | f:  R = block length
 863      F = vb | v:  R = block length - 4
 864      F = vbs | vs:  R = 1044480
 865 
 866 
 867 An injudicious combination of explicit specifications and defaults can
 868 result in an invalid attribute set.  For example, if -record 12000 is
 869 specified, applying the defaults produces the following:
 870         -format vb  -block 8192 -record 12000
 871 This attribute set is invalid because, in vb format (see "Record
 872 Formats" below) the record length must be less than or equal to the
 873 block length minus 4.
 874 
 875 
 876 Overriding Structure Attributes:
 877 Normally, the -format, -block, and -record control arguments are not
 878 included in the attach description of an I/O switch that is opened for
 879 sequential_input; the structure attributes are extracted from the file
 880 labels.  However, the I/O module permits the recorded structure
 881 attributes to be overridden by explicitly specified attach description
 882 control arguments.  Because the apparent structure and characteristics
 883 of the file can be drastically altered, great care must be taken to
 884 ensure that attribute overrides do not produce unexpected and unwanted
 885 results.
 886 
 887 If a file has the following recorded attributes:
 888         -format fb -block 800 -record 80
 889 an explicit specification of the -format fb and -record 800 control
 890 arguments causes each block of ten 80-character records to be treated
 891 as a single 800-character record.
 892 
 893 
 894 If a file has the following recorded attributes:
 895         -format fb -block 800 -record 80
 896 an explicit specification of the -format fb, -block 80, and -record 80
 897 control arguments causes the last 720 characters of every block to be
 898 discarded.  No error is indicated, because every block of the file
 899 contains at least one 80-character record.
 900 
 901 
 902 Record Formats:
 903 Files are structured in one of four record formats:  F(B), V(B), V(B)S,
 904 or U.  When a file is created, its record format should be chosen in
 905 accordance with the nature of the data to be recorded.  For example,
 906 data consisting of 80-character card images is most economically
 907 recorded in FB format, blocked fixed-length records.  Data consisting
 908 of variable length text lines, such as PL/I source code produced by a
 909 text editor, is best recorded in VBS format, blocked spanned records,
 910 so that blanks are not inserted except after the last line.
 911 
 912 With the exception of U format, files are either blocked or unblocked,
 913 blocked being the usual case.  Each block of an unblocked file contains
 914 just one record, whereas each block of a blocked file can contain
 915 several records.  Blocking can provide a significant savings of
 916 processing time, because several records are accessed with a single
 917 physical tape movement.  Furthermore, as blocks are separated by
 918 distances of blank tape, blocking reduces the amount of tape needed to
 919 contain a file.
 920 
 921 
 922 F(B) FORMAT:
 923 In F format, records are of fixed (and equal) length, and files have an
 924 integral number (N) of records per block.  If the file is unblocked, N
 925 equals 1 and the record length (R) equals the block length (B).  If the
 926 file is blocked, N > 1 and B equals (R * N) where N is known as the
 927 blocking factor.
 928 
 929 
 930 The Standard for F format records permits recording short blocks.  A
 931 short block is a block that contains fewer than N records, when N is
 932 greater than 1.  Although the I/O module can read this variant of F
 933 format, it writes a short block in only one case.  The last block of a
 934 blocked file can contain fewer than N records if there are no more
 935 records to be written when the file is closed.  Therefore, blocked F
 936 format files written by the I/O module are always in FBS (fixed blocked
 937 standard) format.
 938 
 939 There are two special cases in which a datum is padded out to length R.
 940 The first case is that of iobl (the number of characters to be written)
 941 equals 0:  a record of R blanks is written.  When such a record is
 942 subsequently read, it is interpreted as a record of R blanks, and NOT
 943 as a zero-length record.  The second case is that of 0 < iobl > R:  the
 944 record is padded on the right with blanks to length R, and the padded
 945 record written.  When such a record is read, the original characters
 946 PLUS the padding are returned.  The case of iobl greater than R is in
 947 error.
 948 
 949 
 950 V(B) FORMAT:
 951 In V format, records and therefore blocks may vary in length.  Each
 952 record is preceded by a four-character record descriptor word (RDW)
 953 that contains the actual record length in binary, including the length
 954 of the RDW itself.  Each block is preceded by a four-character block
 955 descriptor word (BDW) that contains the actual block length in binary,
 956 including the length of the BDW itself.
 957 
 958 V format files have an integral number of records per block, N.  If the
 959 file is unblocked, B = R + 4; if blocked, B >= R + 4; For blocked
 960 records, the number of records per block varies indirectly with the
 961 size of the records.
 962 
 963 
 964 V(B)S FORMAT:
 965 In V(B)S format, a single record is formatted as one or more record
 966 segments.  A record segment contains either a complete record, the
 967 initial portion of a record, a medial portion of a record, or the final
 968 portion of a record.  No two segments of the same record can be
 969 contained in the same block, but a block may contain the segments of
 970 several different records.  The maximum record length is limited only
 971 by the maximum size of a storage system segment, currently 1,044,480
 972 characters.
 973 
 974 V(B)S format files have an integral number of record segments per
 975 block.  If the file is unblocked, each block contains only one record
 976 segment; if blocked, the number of record segments per block is
 977 variable.  In either case, R and B are independent of one another.
 978 
 979 
 980 Each record segment begins with a four-character segment descriptor
 981 word (SDW).  The SDW contains a four-character record segment length in
 982 binary, that includes the length of the SDW itself.  (See "DOS Files"
 983 above.)  The SDW also contains a one-character record segment code in
 984 binary, that indicates if the segment contains a complete record, or an
 985 initial, medial, or final portion.
 986 
 987 
 988 U FORMAT:
 989 U format files contain records that do not conform to either F(B),
 990 V(B), or V(B)S format.  A U format file is always unblocked.  The
 991 record length is undefined, and the block length must equal or exceed
 992 the maximum record length.  Blocks may vary in length.  The special
 993 case of writing a record of less than 20 characters produces a block
 994 padded to length 20 with blanks.
 995 
 996 
 997 Volume Initialization:
 998 The Standard requires that all volumes be initialized with VOL1 and
 999 dummy HDR1 labels before they are used for output.  The I/O module
1000 provides a semiautomatic volume initialization mechanism that performs
1001 this operation as an integral part of the output function.  It should
1002 be noted that, as stated above, a newly initialized volume contains a
1003 dummy HDR1 label, but not a dummy file.  If a file is created on a
1004 newly initialized volume without an explicit specification of the
1005 -number control argument, the I/O module attempts to append it to the
1006 file set, resulting in an error.
1007 
1008 
1009 Conformance To Standard:
1010 With one exception, the I/O module conforms to the Standard:  the I/O
1011 module ignores the data set security field in the HDR1 label on input,
1012 and records it as 0 on output.
1013 
1014 
1015 Label Processing:
1016 VOL1
1017    The label is processed on input and output.  The owner-name and
1018    address-code-field, character positions (CP) 42 to 51, holds a
1019    three-character volume authentication code.
1020 UVL1 - UVL8
1021    These labels are not written on output and ignored on input.
1022 HDR1/EOF1/EOV1
1023    The labels are processed on input and output.  The
1024    system-code-field, CP 61 to 73, is recorded as "MULTICS IBM ".
1025 
1026 
1027 HDR2/EOF2/EOV2
1028    The labels are processed on input and output.  The 17-character
1029    job/job-step-identification-field, CP 18 to 34, is recorded as
1030    follows:
1031 
1032            "MULTICS /" || Julian creation date || "   "
1033 
1034 HDR3/EOF3/EOV3 - HDR8/EOF8/EOV8
1035    These labels are not written on output and are ignored on input.
1036 UHL1/UTL1 - UHL8/UTL8
1037    These labels are not written on output and are ignored on input.
1038 
1039 
1040 Error Processing:
1041 If an error occurs while reading, the I/O module makes 25 attempts to
1042 backspace and reread.  If an error occurs while writing, the I/O module
1043 makes 10 attempts to backspace, erase, and rewrite.  Should an error
1044 while reading or writing data prove to be unrecoverable, the I/O Module
1045 "locks" the file, and no further I/O is possible.  (See
1046 reset_error_lock operation, below.)  If an unrecoverable error occurs
1047 while writing file labels or tapemarks, the user is queried as to
1048 preserving the defective file versus file set consistency.  (See
1049 "Queries" above.)  If an unrecoverable error occurs during certain
1050 phases of volume switching or label reading, the I/O switch may be
1051 closed.  The overriding concern of the error recovery strategy is:
1052    1.   to maintain a consistent file set structure.
1053    2.   to ensure the validity of data read or written.
1054 
1055 
1056 Close Operation:
1057 The I/O switch must be open.
1058 
1059 
1060 List of Control Orders:
1061 The I/O module supports eleven control operations.
1062     hardware_status retention
1063     status          retain_none
1064     volume_status   retain_all
1065     file_status     reset_error_lock
1066     feov            volume_density
1067     close_rewind
1068 In the descriptions below, info_ptr is the information pointer
1069 specified in an iox_$control call.
1070 
1071 
1072 Hardware_status Operation:
1073 This operation returns the 72-bit IOM status string generated by the
1074 last tape I/O operation.  The I/O switch must be open.  The substr
1075 argument (IOM_bits, 3, 10) contains the major and minor status codes
1076 generated by the tape subsystem itself.  (See "MTS500 Magnetic Tape
1077 Subsystem", Order no. DB28 for an explanation of major and minor
1078 status.)  The variable to which info_ptr points is declared as follows:
1079 
1080         declare IOM_bits bit(72) aligned;
1081 
1082 
1083 Status Operation:
1084 This operation returns a structure that contains an array of status
1085 codes, providing an interpretation of the IOM status string generated
1086 by the last tape I/O operation.  These codes may be used in calls to
1087 the com_err_ subroutine, or may be converted to printable strings by
1088 calling the convert_status_code_ subroutine.  (See the descriptions of
1089 the convert_status_code_ and the com_err_ subroutines.)  The I/O switch
1090 must be open.  The structure to which info_ptr points is declared in
1091 device_status.incl.pl1.
1092 
1093 
1094 Volume_status Operation:
1095 This operation returns a structure that contains the status of the
1096 current volume.  If the I/O switch is open, the current volume is the
1097 volume on which the file section currently being processed resides.  If
1098 the switch has never been opened, the current volume is the first (or
1099 only) volume in the volume set.  If the switch was opened, but is now
1100 closed, the current volume is that on which the last file section
1101 processed resides.  If the switch was closed by the I/O module as the
1102 result of an error while writing file header labels, trailer labels, or
1103 tapemarks, the current volume is the last (or only) volume in the
1104 volume set.
1105 
1106 The structure to which info_ptr points is declared in
1107 tape_volume_status.incl.pl1.  In the current implementation of the I/O
1108 module, read_errors and write_errors are always zero.  Eventually, the
1109 resource control package (RCP) supplies these values.
1110 
1111 
1112 File_status Operation:
1113 This operation returns a structure that contains the current status of
1114 the file specified in the attach description.  If the I/O switch has
1115 never been opened, no information can be returned; this situation is
1116 indicated by tape_file_status.state = 0.  If the switch was opened, but
1117 is now closed, the current status of the file is its status just prior
1118 to closing.  If the switch was closed by the I/O module as the result
1119 of an error while writing file header labels, trailer labels, or
1120 tapemarks, the entire file may have been deleted.  In this case, the
1121 structure contains the current status of the previous file in the file
1122 set, if any.
1123 
1124 The tape_file_status structure to which info_ptr points is declared in
1125 file_status.incl.pl1.
1126 
1127 
1128 The "event" referenced in tape_file_status.state above is defined as an
1129 error or circumstance that prevents continued processing of a file.
1130 For example, parity alert while reading, reached end of information, no
1131 next volume available, etc.
1132 
1133 
1134 Feov Operation:
1135 This operation forces end of volume (feov) when writing a file.  The
1136 switch must be open for sequential output.  The operation is equivalent
1137 to detection of the end of tape reflective strip.  The info_ptr should
1138 be a null pointer.
1139 
1140 
1141 Close_rewind Operation:
1142 This operation specifies that the current volume is to be rewound when
1143 the I/O switch is next closed.  info_ptr should be a null pointer.  The
1144 switch need not be open when the operation is issued.  The operation
1145 effects only one close; subsequent closings require additional control
1146 calls.
1147 
1148 
1149 Retention, Retain_none, Retain_all Operations:
1150 These operations cause the tape resources currently in use, i.e., tape
1151 drives(s) and tape volume(s), to be unassigned or retained at detach
1152 time according to the specified retention argument or operation.  The
1153 info_ptr points to a fixed binary number with value as defined below:
1154 1   retention -none or retain_none
1155     causes none of the tape resources currently in use to remain
1156     assigned at detach time.
1157 2   retention -volume
1158     causes the tape volume(s) currently in use to remain assigned at
1159     detach time.
1160 3   retention -device
1161     causes the tape drives(s) currently in use to remain assigned at
1162     detach time.
1163 4   retention -all or retain_all
1164     causes all of the devices and volumes currently in use to remain
1165     assigned at detach time.
1166 
1167 
1168 Reset_error_lock Operation:
1169 This operation unlocks the files so that further I/O is possible
1170 subsequent to a parity-type I/O error while reading.  Such an error is
1171 indicated by a previous iox_$read_record or iox_$position call having
1172 returned the status code error_table_$tape_error.  In this case, the
1173 value of tape_file_status.event_lock is error_table_$tape_error.  (See
1174 file_status operation, above.)  The I/O switch must be open for
1175 sequential_input.  The info_ptr should be a null pointer.
1176 
1177 NOTE:  IF RECORDS ARE BLOCKED AND/OR SPANNED, THE VALIDITY OF ANY
1178 RECORDS READ SUBSEQUENT TO A PARITY-TYPE I/O ERROR IS NOT GUARANTEED.
1179 (The parity error is reported for the first read of a logical record in
1180 the block.  The actual location of the error in the block in unknown.)
1181 
1182 
1183 Volume_density Operation:
1184 This operation returns the encoded density of the volume set.  The I/O
1185 switch need not be open.  The variable to which info_ptr points is
1186 declared as follows:
1187         declare volume_density fixed bin;
1188 The values returned and their meanings are listed below:
1189 
1190          -1          none specified yet
1191           2          800
1192           3          1600
1193           4          6250
1194 
1195 
1196 Detach Operation:
1197 The I/O switch must be closed.  If the I/O module determines that the
1198 membership of the volume set may have changed, the volume set members
1199 are listed before the set is demounted; volumes not listed are
1200 available for incorporation into other volume sets.  If the volume set
1201 is unlabeled, only the name of the last volume processed is listed.
1202 
1203 
1204 Position Operation:
1205 The I/O switch must be open for sequential_input.  The I/O module does
1206 not support skipping backwards.  In the course of a position operation,
1207 events or errors may occur that invoke the query mechanism.  (See
1208 "Queries" above.)  An unrecoverable error locks the file, and a severe
1209 error causes the I/O module to close the I/O switch.
1210 
1211 
1212 Read Length Operation:
1213 The I/O switch must be open for sequential_input.  In the course of a
1214 read_length operation, events or errors may occur that invoke the query
1215 mechanism.  (See "Queries" above.)  An unrecoverable error locks the
1216 file, and a severe error causes the I/O module to close the I/O switch.
1217 
1218 
1219 Read Record Operation:
1220 The I/O switch must be open for sequential_input.
1221 
1222 
1223 Write Record Operation:
1224 The I/O switch must be open for sequential_output.
1225 
1226 
1227 Unlabeled Tapes:
1228 The I/O module supports basic processing of unlabeled tapes that are
1229 structured according to the "OS Tape Labels" document mentioned at the
1230 beginning of this description.  DOS leading tape mark (LTM) unlabeled
1231 format tapes cannot be processed.
1232 
1233 The -no_labels control argument specifies that unlabeled tapes are to
1234 be processed.  The -no_labels control argument and any of the following
1235 control arguments are mutually exclusive:
1236     -name          -extend
1237     -replace       -modify
1238     -expires       -dos
1239     -force
1240 
1241 
1242 Volume switching is handled somewhat differently for unlabeled tapes.
1243 When the I/O module detects a tape mark in the course of an input
1244 operation, it determines whether or not any volumes remain in the
1245 volume sequence list.  If another volume appears in the list, volume
1246 switching occurs and processing continues on the next volume.  If the
1247 list is exhausted, the I/O module assumes that end of information has
1248 been reached.  Detection of end of tape during an output operation is
1249 handled in much the same way as it would be for a labeled tape.  (See
1250 the "OS Tape Labels" document for a complete description of unlabeled
1251 volume switching strategy.)
1252 
1253 
1254 Control Operations from Command Level:
1255 All control operations supported by this I/O module can be executed
1256 from command level by using the io_call command.  The general format
1257 is:
1258         io_call control switchname operation -control_arg
1259 
1260 
1261 where:
1262 switchname
1263    is the name of the I/O switch that is attached through the I/O
1264    module to an IBM tape file-set.
1265 operation
1266    is any of the control operations previously described and summarized
1267    below.
1268       operation          abbreviation     control_arg
1269       ---------          ------------     -----------
1270       status                   st           -all
1271       hardware_status         hst
1272       reset_error_lock        rel
1273       file_status             fst
1274       volume_status           vst
1275       retention               ret           -none, -volume,
1276                                             -device, -all
1277       retain_all             reta
1278       retain_none            retn
1279       close_rewind            crw
1280       feov                   feov
1281 
1282 
1283 Control arguments:
1284    are operation control arguments valid only for the retention and the
1285    status operations.  A control argument is required for the retention
1286    operation.
1287 -none
1288    causes none of the tape resources currently in use to remain
1289    assigned at detach time.
1290 -volume
1291    causes the tape volume(s) currently in use to remain assigned at
1292    detach time.
1293 -device
1294 -all
1295    causes all of the devices and volumes currently in use to remain
1296    assigned at detach time.
1297 
1298 
1299 The -all control argument is optional for the status operation.  This
1300 control argument prints all available status information such as the
1301 device status, the volume status, the file status, and the hardware
1302 status.  The -all control argument is only for use with the status
1303 operation through the io_call command.  It is not defined for use in
1304 the status operation with iox_$control directly.
1305