MPE/iX Intrinsics Reference Manual (32650-90905)
Chapter 6 255
Command Definitions (FLUSHLOG-GETUSERMODE)
FREADBACKWARD
FREADBACKWARD
NM and CM callable.
Reads a logical record backward from the current record pointer. Data is presented as if
read forward. Used for tape files only. Can recover tape errors when handling I/O
management and data recovery routines.
Syntax
I16 I16V UDS I16V
transfercount
:=FREADBACKWARD(
filenum,buffer,length
);
Functional Return
transfercount
16-bit signed integer
Returns the length of the data transferred to
buffer
:
• If a negative value is passed in the
length
parameter, the
transfercount
is a positive value indicating the number of bytes
transferred.
• If a positive value is passed in the
length
parameter, the
transfercount
is a positive value indicatingthe number of half words
transferred.
NOTE If the file is opened with the nowait I/O option enabled,
transfercount
is
zero. The IOWAIT intrinsic can be used to determine the length of the data
transferred.
Parameters
filenum
16-bit signed integer by value (required)
Passes the file number of the file to be read.
buffer
user-defined structure (required)
Returns the specified record. This structure must be large enough to hold
all of the information to be returned.
length
16-bit signed integer by value (required)
Returns the length of the data to be transferred to
buffer
:
Value Meaning
<0 Length in bytes
=0
No transfer occurs
>0 Length in half words