next up previous index
Next: Z303 Random Access Up: CERNLIB Previous: Z300 IBM-Dependent Input/Output

Z301 VAX Fortran Interface for Reading and Writing 'Foreign' Tapes

Routine ID: Z301
Author(s): C. Ciapetti, J. ZollLibrary: KERNLIB, VAX only
Submitter: Submitted: 01.09.1983
Language: VAX FortranRevised:

VAXTIO handles non-native tapes on the VAX; it is needed because VAX Fortran does not provide a U format.

If the tape to be handled is on logical unit 11, mounted on MTAO, with physical records of 3600 bytes maximum, for example, the following commands have to be given:

    $ MOUNT MTAO:/FOREIGN/BLOCKSIZE=3600/RECORDSIZE=3600
    $ ASSIGN MTA0: QIOUNIT11

Structure:

SUBROUTINE subprogram
User Entry Names: VAXTIO
Internal Entry Names: WAIT2S
Files Referenced: User defined parameter
COMMON Block Names and Lengths: /VAXTIO/ 240

Usage:

   CALL VAXTIO(LUN,MODOP,IBUF,NDO,NDONE,NCODE,LUNMSG)
Input parameters:
LUN
Logical unit number (0 < LUN < 61 ).
MODOP
Operation mode, indicating the kind of operation to be performed; for details, see below.
IBUF
Data area for read and write.
NDO
Number of units to be done.
LUNMSG
Fortran logical unit number for printing diagnostic messages; if zero, printing is suppressed.
Output parameters:
NDONE
Number of units done; error if negative.
NCODE
QIO System status code.
The following operations are provided at present:
MODOP=-2: 2lWrite EOF(3 tape marksare written and the tape is positioned after the first
2ltape mark).
NDONE = 1 Successful.
NDONE = 0 End-of-tape.
NDONE =-7 Trouble.
MODOP=-1: 2lWrite one record, tranferNDObytes from IBUFto tape.
NDONE > 1 Number of bytes written.
NDONE = 0 End-of-tape, but record written.
NDONE =-7 Trouble.

MODOP=0: 2lRead one record, transfer at mostNDObytes from tape to IBUF, excess data
2lare lost.
NDONE > 0 Number of bytes transferred.
NDONE = 0 EOF, end-of-tape.
NDONE =-1 Read error, record skipped.
NDONE =-7 Trouble.
MODOP=1: 2lAssign a channel for logical unit(if not done explicitly, assignment occurs on
2lfirst contact).
NDONE = 1 Successful.
NDONE = 0 Channel already assigned.
NDONE =-7 Trouble.
MODOP=2: 2lSkip |NDO| records, forward if NDO>0 , reverse if NDO < 0 .(|NDO| < 32768 )
NDONE > 0 Number of records skipped.
NDONE < NDO EOFseen, skipped, counted.
NDONE =-7 Trouble.
MODOP=3: 2lSkip |NDO| files, forwardif NDO > 0 , reverse if NDO < 0 .
NDONE > 0 Number of files skipped.
NDONE < NDO End-of-tape seen.
NDONE =-7 Trouble.
MODOP=4: Rewind.
MODOP=5: 2lRewind and unload.
NDONE = 1 Successful.
NDONE =-7 Trouble.
MODOP=6: 2lDe-assign channel; this shouldbe done if a logical unit is no longer needed.
NDONE = 1 Successful.
NDONE =-7 Trouble.


Z303



next up previous index
Next: Z303 Random Access Up: CERNLIB Previous: Z300 IBM-Dependent Input/Output


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995