Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ctTruncateFile

ctTruncateFile() truncates a data file, meaning a new copy of the file is created with no data records. File properties and resources are preserved.

Type

ISAM Function

Declaration

NINT ctDECL ctTruncateFile(pTEXT filename,pTEXT fileword);

Description

  • filename - name of the file.
  • fileword - (optional) file password.

Return

This function requires the caller to have write access to data file, otherwise it returns error 54 (REDF_ERR, attempt to write a read only file).

Limitations

Requires data file to have an IFIL resource; otherwise, the function call fails with error RNOT_ERR (408, resource not found).

TOCIndex