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. 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. If bufsiz is too small, GetIFile() returns the actual size, but no IFIL information is returned. Call GetIFile() again with a sufficiently large buffer.

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

Return

GetIFile() returns the actual length 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 table below.

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