HPlogo Asynchronous Serial Communications Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 Intrinsics Reference

FCHECK

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Used to request specific details about file input/output errors.

SYNTAX

        I16V       I16       I16      I32     I16
FCHECK(filenum,fserrorcode,translog,blocknum,numrecs);

Use

You can use the FCHECK intrinsic to obtain specific details about an error that occurred during execution of a file system intrinsic. If an intrinsic returns a condition code of CCL or CCG, FCHECK should be used to determine the error code associated with the problem that occurred. You can then use FERRMSG to display the message associated with that error code.

You can determine the error condition of a failed FOPEN call when no file number was returned by setting the filenum parameter to 0. In this case only, fserrorcode returns valid information.

Do not use FCHECK to determine error conditions of failed calls to HPFOPEN. Error conditions associated with failed HPFOPEN calls are returned in the HPFOPEN status parameter.

Parameters

filenum

16-bit signed integer by value (optional)

The file number of the file for which error information is to be returned. If you do not specify filenum, or if you specify 0, FCHECK assumes you want error information concerning 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. A return value of 0 indicates that the previous operation was successful or an EOF was encountered. Default: The error code is not returned.

translog

16-bit signed integer by reference (optional)

Returns the transmission log value that indicates the number of halfwords that were actually read or written.

Default: The transmission log value is not returned.

blocknum

32-bit signed integer by reference (optional)

For asynchronous devices, this parameter is used to return the number of records read or written to a device since the last FOPEN. A logical record count is returned for spoolfiles; a physical record count is returned for fixed and undefined record files.

numrecs

16-bit signed integer by reference (optional)

Returns the number of logical records in the block (blocking factor). Blocking factor is not meaningful for asynchronous devices.

Default: The number of logical records is not returned.

Summary of Error Codes

Table 8-2 “Error Codes” lists the file system error codes that you are most likely to encounter during intrinsic calls related to asynchronous devices.

Table 8-2 Error Codes

FS Code (decimal)Description
0Successful (no errors) or end-of-file (EOF) reached.
20Invalid operation requested by program (for example, you tried to set the terminal type to -24, which is an invalid entry).
21Parity error occurred during read.
22Read limit timer set by user expired. (Timer set via FCONTROL(4).)
24Device not ready (not on line, modem's Data Set Ready signal not "high", or line disconnected).
27Block mode read timer expired. This timer is set by the system, and is not user changeable. If no RS character is received before the time expires, the read is terminated.
28Timing error—Data arrived at controller faster than it could be serviced (data overrun).
31Read ended by an Additional End-of-Record character (defined via FCONTROL(25)).
32Software abort of I/O operation occurred (for example, an ABORTIO command was entered.
33Data was lost, or no buffer was available.
42Operation inconsistent with device type (for example, attempted to set an invalid line speed via FCONTRO(11)).
68Insufficient system resources.
70I/O error while printing header/trailer. Also appears if an FOPEN or FCLOSE failed
95The read was halted because the terminal user hit [Break]. The file system will automatically restart the read when the user enters the :RESUME command. Only the file system see the restart, the application program does not.
98Read timer overflow. Read exceeded maximum capacity of read timer (655.35 seconds).

 

Condition Codes

CCE

Request granted.

CCG

Not returned by this intrinsic

CCL

Request denied. The file number passed by filenum is invalid, or a bounds violation occurred while processing this request (fserrorcode is 73).

Additional Discussion

Refer to the discussion of getting file information in Accessing Files Programmer's Guide.

Feedback to webmaster