Magnetic Tape Facilities


DMAGCLAIM

%externalintegerfn DMAG CLAIM(%string(6)TSN, %integername SNO, %integer REQ, MODE) The magnetic tape volume labelled TSN is either claimed (REQ=0) or released (REQ=1). MODE should be set to 1 to allow read access to the tape, 2 if write access is required, or 3 for either read or write access. If a CLAIM call is successful, SNO is set with a number to be used in subsequent calls of DMAG IO. If TSN is null in a RELEASE call, then all claimed tapes are released. Possible error results from Volumes: 101 Bad parameters 102 Duplicate request 103 Request lists full 104 Volume not available (Operators have said "NO <val id>") 105 Volume request list full 106 No tapes in tape list (A, B, S or E) 107 Device not claimed when a "release" is done.

DMAGIO

%externalintegerfn DMAG IO(%integername REPLY FLAG, CONTROL, LEN, %integer TYPE, SNO, ADR) The parameter TYPE determines the action of the procedure: TYPE = 0 erase 1 read 2 write 3 check-write (not implemented) 4 check-read (no data transfer) 5 private chain (not implemented) 6 rewind to BT 7 spare 8 file position 9 tape position 10 write tape-mark SNO should be set with the value returned by a previous CLAIM (procedure DMAG CLAIM). ADR and LEN specify the area from or to which data is to be transferred (if relevant). In the case of TYPE = 1 (read) LEN is set on return to be the number of bytes transferred. Bits in parameter CONTROL are used to specify detailed actions by the tape handler routine, as follows: 2**0 - 2**1 suppress error re-try 2**2 ignore short-block indication 2**3 ignore long-block indication Bits in CONTROL on return are used to indicate the occurrence of conditions during execution of a request, as follows: 2**0 short-block indication 2**1 long-block indication These bits will not be set on return if the respective bits for "ignore short/long-block indication" were specified in the request. REPLY FLAG (valid when the result of the function is zero) is set to zero for a successful operation, or 1 failure (parity etc.) 2 request rejected 4 beginning of tape, end of tape or unexpected tape mark found, but operation otherwise successful TYPE=8 For request TYPE=8 (file position), LEN specifies the number of blocks to be skipped: negative means backwards, positive forwards, zero is invalid. If a tape-mark is found (REPLY FLAG=4) then a skip back of one block is performed before the reply is given. It is thus impossible to pass a tape-mark except by the use of a "tape position" request. TYPE=9 For request TYPE=9 (tape position), LEN is the number of (notional) files to be skipped, and CONTROL is the number of tape-marks in a notional file, CONTROL must be positive. If LEN is negative the skip is backwards, if positive then it is forwards, zero is invalid. CONTROL*LEN tape-marks are skipped. A backwards skip will stop at BT. A forward skip will stop if the first block within a (notional) file is a tape-mark, the tape will then be positioned before the tape-mark and REPLY FLAG=4 will be returned. Thus if CONTROL=1 and LEN="very large", the tape will be positioned between the first double tape-mark encountered.