Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

PutIFileXtd8

Put an IFIL structure into a data file resource record. Extended 8-byte version.

Short Name

PUTIFILX8()

Type

Extended 8-byte ISAM Function

Declaration

COUNT PutIFileXtd8(pIFIL ifilptr, cpTEXT dataextn,

cpTEXT indxextn, cpTEXT fileword, pXCREblk pxcreblk)

Description

PutIFileXtd8() extends PutIFileXtd() in that it can be used on an open file. It accepts a pointer to an extended file creation block, pxcreblk, however, does not currently use that information and NULL should be passed in.

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

IFIL resource stored successfully.

The following three points will help users avoid any error when using this function:

  • The file must be opened in exclusive mode.
  • The tfilno member of the IFIL structure must be set to the current file number.
  • The xcreblk structure must be allocated and its splval member must be set to ctFILEOPENED constant value.

See c-tree Error Codes in the c-tree Programmer’s Reference Guide for a complete listing of valid c-tree error values.

Example

IFIL vc_dat = {

. . . .

}; /* IFIL structure to be placed in resource record */


COUNT ret=0; /* function return work variable */

pTEXT fileword;


getfileword(&fileword);

if (ret = PutIFileXtd8(&vc_dat, NULL, NULL, fileword, NULL))

printf("\nError during PUTIFILX8, error = %d",ret);

else

printf("\nSuccessful PUTIFILX8!");

See also

PutIFile(), PutIFileXtd()

TOCIndex