Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gerror(3f) [bsd man page]

PERROR(3F)																PERROR(3F)

perror, gerror, ierrno - get system error messages SYNOPSIS
subroutine perror (string) character*(*) string subroutine gerror (string) character*(*) string character*(*) function gerror() function ierrno() DESCRIPTION
Perror will write a message to fortran logical unit 0 appropriate to the last detected system error. String will be written preceding the standard error message. Gerror returns the system error message in character variable string. Gerror may be called either as a subroutine or as a function. Ierrno will return the error number of the last detected system error. This number is updated only when an error actually occurs. Most routines and I/O statements that might generate such errors return an error code after the call; that value is a more reliable indicator of what caused the error condition. FILES
/usr/lib/libU77.a SEE ALSO
intro(2), perror(3) D. L. Wasley, Introduction to the f77 I/O Library BUGS
String in the call to perror can be no longer than 127 characters. The length of the string returned by gerror is determined by the calling program. NOTES
UNIX system error codes are described in intro(2). The f77 I/O error codes and their meanings are: 100 ``error in format'' 101 ``illegal unit number'' 102 ``formatted i/o not allowed'' 103 ``unformatted i/o not allowed'' 104 ``direct i/o not allowed'' 105 ``sequential i/o not allowed'' 106 ``can't backspace file'' 107 ``off beginning of record'' 108 ``can't stat file'' 109 ``no * after repeat count'' 110 ``off end of record'' 111 ``truncation failed'' 112 ``incomprehensible list input'' 113 ``out of free space'' 114 ``unit not connected'' 115 ``invalid data for integer format term'' 116 ``invalid data for logical format term'' 117 ``'new' file exists'' 118 ``can't find 'old' file'' 119 ``opening too many files or unknown system error'' 120 ``requires seek ability'' 121 ``illegal argument'' 122 ``negative repeat count'' 123 ``illegal operation for unit'' 124 ``invalid data for d, e, f, or g format term'' 4.2 Berkeley Distribution June 7, 1985 PERROR(3F)

Check Out this Related Man Page

TOPEN(3F)																 TOPEN(3F)

topen, tclose, tread, twrite, trewin, tskipf, tstate - f77 tape I/O SYNOPSIS
integer function topen (tlu, devnam, label) integer tlu character*(*) devnam logical label integer function tclose (tlu) integer tlu integer function tread (tlu, buffer) integer tlu character*(*) buffer integer function twrite (tlu, buffer) integer tlu character*(*) buffer integer function trewin (tlu) integer tlu integer function tskipf (tlu, nfiles, nrecs) integer tlu, nfiles, nrecs integer function tstate (tlu, fileno, recno, errf, eoff, eotf, tcsr) integer tlu, fileno, recno, tcsr logical errf, eoff, eotf DESCRIPTION
These functions provide a simple interface between f77 and magnetic tape devices. A ``tape logical unit'', tlu, is ``topen''ed in much the same way as a normal f77 logical unit is ``open''ed. All other operations are performed via the tlu. The tlu has no relationship at all to any normal f77 logical unit. Topen associates a device name with a tlu. Tlu must be in the range 0 to 3. The logical argument label should indicate whether the tape includes a tape label. This is used by trewin below. Topen does not move the tape. The normal returned value is 0. If the value of the function is negative, an error has occured. See perror(3F) for details. Tclose closes the tape device channel and removes its association with tlu. The normal returned value is 0. A negative value indicates an error. Tread reads the next physical record from tape to buffer. Buffer must be of type character. The size of buffer should be large enough to hold the largest physical record to be read. The actual number of bytes read will be returned as the value of the function. If the value is 0, the end-of-file has been detected. A negative value indicates an error. Twrite writes a physical record to tape from buffer. The physical record length will be the size of buffer. Buffer must be of type char- acter. The number of bytes written will be returned. A value of 0 or negative indicates an error. Trewin rewinds the tape associated with tlu to the beginning of the first data file. If the tape is a labelled tape (see topen above) then the label is skipped over after rewinding. The normal returned value is 0. A negative value indicates an error. Tskipf allows the user to skip over files and/or records. First, nfiles end-of-file marks are skipped. If the current file is at EOF, this counts as 1 file to skip. (Note: This is the way to reset the EOF status for a tlu.) Next, nrecs physical records are skipped over. The normal returned value is 0. A negative value indicates an error. Finally, tstate allows the user to determine the logical state of the tape I/O channel and to see the tape drive control status register. The values of fileno and recno will be returned and indicate the current file and record number. The logical values errf, eoff, and eotf indicate an error has occurred, the current file is at EOF, or the tape has reached logical end-of-tape. End-of-tape (EOT) is indicated by an empty file, often referred to as a double EOF mark. It is not allowed to read past EOT although it is allowed to write. The value of tcsr will reflect the tape drive control status register. See ht(4) for details. FILES
/usr/lib/libU77.a SEE ALSO
ht(4), perror(3F), rewind(1) 4.2 Berkeley Distribution May 15, 1985 TOPEN(3F)
Man Page