HPlogo MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions (ABORTSESS - FCLOSE)

FCHECK

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Returns specific details about error conditions that occurred when a file system intrinsic returns 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)

Passes the file number of the file for which error information is to be returned. If filenum is set to zero or if it is not specified, 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 half words 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).

(ASC only) This parameter is not meaningful for asynchronous devices.


Error Code Table

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.

Condition Codes


CCE (2)Request granted.
CCG (0)Not returned.
CCL (1)Request denied. The file number passed by filenum is invalid, or a bounds violation occurred while processing this request (fserrorcode=73).

Related Information


Intrinsics FERRMSG, PRINTFILEINFO
Manuals Accessing Files Programmer's Guide
Using KSAM XL
Asynchronous Serial Communications Programmer's Reference Manual




FATHER


FCLOSE