tapeio(3F)

topen, tclose, tread, twrite, trewin, tskipf, tstate - FORTRAN tape device-specific I/O routines

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

NAME
     topen, tclose, tread, twrite, trewin, tskipf, tstate - FORTRAN tape
     device-specific I/O routines

SYNOPSIS
     integer  topen, tclose, tread, twrite, trewin, tskipf, tstate
     integer  tlu
     character*(*) buffer
     character*(*) devnam
     logical labled

     ierror = topen(tlu, devnam, labled)
     ierror = tclose(tlu)
     nbytes = tread(tlu, buffer)
     nbytes = twrite(tlu, buffer)
     ierror = trewin (tlu)
     ierror = tskipf (tlu, nfiles, nrecs)

     integer fileno, recno, err, eof, eot, tcsr
     ierror = tstate (tlu, fileno, recno, err, eof, eot, tcsr)

DESCRIPTION
     This routine is only available with the MIPSpro Fortran 77 compiler.

     tapeio is the general name for the set of intrinsic I/O functions that
     operate on a tape device.  topen, tclose, trewin, tskipf, and tstate
     return -1 on error, 0 if successful. tread and twrite return -1 on
     error, the number of bytes read (or written) on success.

     topen opens a tape unit for I/O.  devnam is the name of the tape
     device.  labled should be .true. if the tape is labeled.  tlu is set
     to the logical unit number of the tape device used for subsequent
     calls.

     tclose closes a tape unit previously opened by topen.

     tread reads from the tape device into buffer.  nbytes is set to the
     number of bytes actually read, or -1 for an error.  Zero (0) may be
     returned in an end-of-file or end-of-tape situation.

     twrite writes to the tape device from buffer.  nbytes is set to the
     number of bytes actually written, or -1 for an error.

     trewin rewinds the tape device.

     tskipf skips forward nfiles files and nrecs records.

     tstate returns the status of the tape channel.  Upon successful
     completion, 0 is returned and the following values are set:

     fileno    current file number

     recno     current record number

     err       1 if there are errors, 0 if there are no errors

     eof       1 if it is at end-of-file, 0 if not

     eot       1 if it is at end-of-tape, 0 if not

     tcsr      the value of the drive status register; see mt_dsreg in
               /usr/include/sys/mtio.h.

SEE ALSO
     mtio(7)