Using KSAM/XL and KSAM 64 (32650-90886)

72 Chapter9
KSAM Intrinsics
FCHECK
FCHECK
Returns specific details about error conditions that occurred when a file system intrinsic
returned a condition code indicating an I/O error. FCHECK applies to files on any device.
Syntax
I16V I16 I16 I32 I16
FCHECK(
filenum,fserrorcode,translog,blocknum,numrecs
);
Parameters
filenum
16-bit signed integer by value (optional)
Specifies the file number of the file for which error information is to be
returned. If
filenum
is not specified or set to zero, error information is
returned about the last failed FOPEN call.
fserrorcode
16-bit signed integer by reference (optional)
Returns a file system error code indicating the type of error that occurred.
translog
16-bit signed integer by reference (optional)
Returns the number of halfwords read or written if an I/O error occurred.
(This value is recorded in the transmission log.)
blocknum
32-bit signed integer by reference (optional)
Returns the physical record count for a nonspoolfile or the logical record
count for a spoolfile:
For fixed-length and undefined-length record files, the physical count is
the number of physical records transferred to or from the file since
FOPEN.
For variable-length record files, the physical count is the last rewind,
rewind/unload, space forward or backward to tape mark.
numrecs
16-bit signed integer by reference (optional)
Returns the number of logical records in the bad block (blocking factor).
Operation Notes
FCHECK is used to determine the error conditions of the last failed FOPEN intrinsic call (even
if a file number was not returned) by setting the
filenum
parameter to zero. In this case,
only
fserrorcode
returns valid information.
Do not use FCHECK to determine error conditions of a last failed HPFOPEN call; error
conditions are returned in the HPFOPEN
status
parameter.