Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

GetIFile

Retrieve an IFIL structure from a data file

Short Name

GETIFIL()

Type

ISAM resource function

Declaration

VRLEN GetIFile(FILNO datno, LONG bufsiz, pVOID bufptr)

Description

In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering

GetIFile() returns a complete IFIL structure into the buffer pointed to by bufptr. bufsiz contains the size of the buffer. If bufsiz is too small, GetIFile() returns a required buffer size, but no IFIL information is returned. Call GetIFile() again with the required buffer size. If bufsiz is sufficiently large, the value returned by GetIFile() is the actual length of the IFIL structure and its subsidiary IIDX and ISEG structures, which are included in the buffer. In some cases the actual size may be less than the required buffer size.

It is permissible to cast the buffer pointer to a pointer of type pIFIL.

Return

GetIFile() returns either the required or the actual size of the IFIL structure (including associated IIDX and ISEG structures) from the data file referred by datno.

In case of error, GetIFile() returns a zero value. The error code can be found in isam_err. Possible errors are described in the following table.

Value

Symbolic Constant

Explanation

401

RNON_ERR

Resources not enabled.

408

RNOT_ERR

No IFIL information assigned to the file.

438

DZRO_ERR

Zero-length resource found in the file.

See FairCom DB Error Codes for a complete listing of valid FairCom DB error values.

Refer to the following sections for additional details regarding IFIL structures.

IFIL Structure

IIDX Structure

ISEG Structure

Limitations

Resources are required.

See also

OpenFileWithResource(), PutIFile()

TOCIndex