Chapter 4. Tape and Named Pipe Support

Table of Contents
4.1. Tape support
4.2. Named pipes

Tape handling is usually provided through the tape subsystem with a minimum of user intervention. However, user end-of-volume (EOV) processing, bad data handling, and some tape positioning actions require additional support routines.

Named pipes or UNIX FIFO special files are created with the mknod(2) system call; these special files allow any two processes to exchange information. The system call creates an inode for the named pipe and establishes it as a read/write named pipe. It can then be used by standard Fortran I/O or C I/O. Piped I/O is faster than normal I/O; it requires less memory than memory-resident files.

The er90 layer is not available on Cray  T3E systems.

4.1. Tape support

You can write and read from a tape using formatted or unformatted I/O statements. You can also use BUFFER IN and BUFFER OUT statements and the logical record routines (READC, READP, WRITEC, and WRITEP) to access the tape file from a Fortran program. For complete details about using tape files in Fortran programs on UNICOS and UNICOS/mk platforms, see the Tape Subsystem User's Guide.

4.1.1. User EOV processing

Several library routines assist users with EOV processing from a Fortran program. Tape-volume switching is usually handled by the tape subsystem and is transparent to the user. However, when a user requests EOV processing, the program gains control at the end of tape, and the program may perform special processing. The following library routines can be used with tape processing:

  • CHECKTP checks the tape position.

  • CLOSEV closes the volume and mounts the next volume in a volume identifier list.

  • ENDSP disables special tape processing.

  • SETSP enables and disables EOV processing.

  • STARTSP enables special tape processing.

4.1.2. Handling bad data on tapes

The SKIPBAD(3F) and ACPTBAD routines can be called from a Fortran program to handle bad data on tape files.

  • SKIPBAD skips bad data; it does not write it to the buffer.

  • ACPTBAD makes bad data available by transferring it to the user-specified buffer. It allows a program to read beyond bad data within a file by moving it into the buffer and positioning past the bad data.

4.1.3. Positioning

The GETTP(3F) and SETTP(3F) file positioning routines change or indicate the position of the current file.

  • GETTP gets information about an opened tape file.

  • SETTP positions a tape file at a tape block and/or a tape volume.