This key allows access to the data on the tape. Many functions are controlled by the capability mask. Different copies of the TAPEKEY will produce access keys with different capabilities.
The tape access key transmits data to the requestor in records. These records may be blocked and unblocked into and out of tape blocks according to the format specified. This makes tape operations transparent to the requestor. All error recovery is handled by the access key.
NOTE! When variable and variable blocked formats are specified, the length of the data passed to the ACCESS key must be 4 bytes shorter that the specified record length in the format. The format is specified as an OS system will see the tape. OS type control words are added to the records by the ACCESS key so the user need not worry about such things. However the actual data must be 4 bytes less than the specified record length and the block length must be at least 4 bytes longer than the record length as there is a block control word added by the ACCESS key.
TAPEACCESS(kt ==> x'52b')
TAPEACCESS(0,(2,file #) [(1,F^V^U)][(2,BLKSIZE)][(2,LRECL)]; ==> c) OPEN a file for input.
Not all of the format information needs to be specified. Starting from the left only that portion that the caller wants changed needs to be specified. If only the record format is specified then the block size and record length will remain at the default settings (fixed blocked 80/3200). If the block size is to be changed then specify the format and the blocksize.
Return codes
c = 1 read rights restricted.
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 There is already a file open on this tape.
c = 4 bad format specifications.
c = 5 file number not specified as 2 bytes (less than 2 bytes on call).
c = 6 File requested is beyond the end of the tape (passed two consecutive file marks).
c = 8 unrecoverable read error in headers
The filename is included on calls for open of unlabelled tapes for compatibility. The caller need not know if the tape is unlabelled.
Return codes
c = 1 read rights restricted.
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 There is already a file open on this tape.
c = 4 bad format specifications.
c = 5 file number not specified as 2 bytes (less than 2 bytes on call).
c = 6 attempt to position beyond the end of the tape
c = 7 Tape was mounted without a ring.
c = 8 unrecoverable read error in headers (for disp = MOD)
Return codes
c = 1 read rights restricted.
Return codes
c = 1 write writes restricted.
Return codes
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 No file is open
If the tape is unlabelled and this is a write at loadpoint, the label verification is calculated and stored in the TAPEKEY.
For Unlabelled tapes, the first block may not appear to be a label. It may not be an 80 byte record with the first 4 bytes "VOL1". The density is set on the drive if the tape is unlabelled and the first record is written.
When End of Tape is indicated, the file is closed indicating end of volume. To continue, call TAPEKEY to mount the next volume, and ,if successful, call TAPEACCESS to open file 1. Attempts to write records after an End of Tape without following the above procedure will result in return code 3.
Return codes
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 Tape is not opened for output.
c = 4 Record length error (incorrect length on fixed blocked, or more than recordlength-4 for variable).
c = 5 End of tape encountered (switch reels or close file).
c = 6 Unrecoverable error on write (after many erase gaps)
c = 7 Drive not capable of the density in the default format
c = 8 first record of unlabelled tape looks too much like a label.
When the End of Tape return is made, the file is closed. To continue reading (for multivolume files), call the TAPEKEY to mount next volume and call TAPEACCESS to open file 1. Attempts to read without doing the above will result in return code 3.
Attempts to read after End of File will result in repeated End of File indications.
Return codes
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 file not opened for input
c = 4 Record length error (actual tape block not agree with blocksize).
c = 5 End of Tape
c = 6 End of File
c = 8 Unrecoverable error on read (data is supplied as read)
c = 16 For format U records only. Record (block) exceeds 4096 bytes. 4096 bytes will be returned on this and subsequent requests until the return code is 0 (or some error).
Any tape that is not part of a multivolume set may be made unlabelled. After such an operation, the labels on the tape may be read or overwritten. The tape may be returned to its status as labelled only by a write label operation.
The first block written on an unlabelled tape may not look like a label.
Return Codes
c = 1 make unlabelled rights restricted
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 tape is currently open.
c = 4 TAPEKEY is for a multivolume set
c = 5 first file is null
c = 8 first record is unreadable
Return codes
c = 1 rights restricted
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 Label not valid (wrong tape mounted).
Return codes
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 write label failed.
c = 4 not a single volume TAPEKEY
c = 5 File open on on this tape
c = 7 Drive not capable of the density in the default format
c = 8 Cannot write label on a tape after a Makeunlabelled operation.
Return codes
c = 1 rights restricted
c = 2 The tape drive access key has disappeared either because of a Gnosis restart or a non-recoverable error in positioning.
c = 3 Standard label has incorrect volume id (does not agree with Reel Number in tapekey).
Any pending interrupts are cleared before the sense is issued. This is intended to be used by the Tape Operator to sense whether a ring is in the tape after a mount. The pending interrupt is cleared because it is expected after the mount (device end).
Return codes
c = 2 tapedrive access key has disappeared due to a Gnosis restart.
Return codes
c = 1 not allowed
c = 2 tapedrive access key has disappeared due to a Gnosis restart.
This is not of much use. The function may be expanded. The density currently is set whenever the first block is written on the tape.
MODE is a character of one of the following: "2" - 800 bpi, "3" - 1600 bpi, "4" - 6250 bpi, "5" - future density.
CSW and SENSE are present if the operation gets either unit check or unit exception.
Return codes
c = 1 not allowed
c = 2 tapedrive access key has disappeared due to a Gnosis restart.
c = 3 mode is not 1 byte
c = 4 mode character invalid
c = 5 I/O error csw and sense present
Return codes