Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mtstatus(3F) — Sun FORTRAN 1.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

topen(3f)

ioctl(2)

mtio(4s)

perror(3f)

read(2)

st(4s)

write(2)

MTSTATUS(3F)  —  FORTRAN LIBRARY ROUTINES

NAME

mtstatus − f77 magnetic tape I/O status

OVERVIEW

The mtstatus function gets various magnetic tape I/O error return registers  and other indicators. 
Use this with the topen, tclose, tread, twrite, trewin, tskipf, and tstate FORTRAN tape I/O routines. 
Do not mix this or any of these functions with standard FORTRAN I/O. 

DESCRIPTION

Syntax: n = mtstatus( tlu, type, dsreg, erreg, resid, fileno, blkno, flags, bf )

tlu is the tape logical unit.  It must be in the range 0 to 7.  (integer input argument) type is the type of magnetic tape device.  (integer output argument)
dsreg is the drive status register.  (integer output argument)
erreg is the error register.  (integer output argument)
resid is the residual count register.  (integer output argument)
fileno is the file number of the current position.  (integer output argument)
blkno is the block number of the current position.  (integer output argument)
flags : Is it SCSI? Is it a reel?  Does it support absolute file positioning? ...  (integer output arg)
bf is the optimum blocking factor.  (integer output argument) n is the return value: n=0 indicates OK.  n=−1 indicates an error. 

Example: Get the set of status return registers and other indicators.

        INTEGER  bf, blkno, dsreg, erreg, fileno, flags, mtstatus, n /0/, resid, tlu /1/, type
...
        < Some use of: topen, tclose, tread, twrite, trewin, tskipf, or tstate >
         n = mtstatus( tlu, type, dsreg, erreg, resid, fileno, blkno, flags, bf )
        IF ( n .LT. 0 ) STOP "mtstatus: cannot get status"
        WRITE(∗,’(10 I2)’) n, tlu, type, dsreg, erreg, resid, fileno, blkno, flags, bf
        END
The displayed output is
 0 1 0 0 0 0 0 0 0 0

If actual errors occur, you’ll need a format like 10(/Z18) to see the details.

FILES

libF77.a

SEE ALSO

topen(3f), ioctl(2), mtio(4s), perror(3f), read(2), st(4s), write(2). 

NOTE

The values returned in dsreg and erreg are totally dependent on the device.  They vary with the size, type, vendor, etc. 

Sun Release 4.1  —  Last change: 2 August 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026