fclear64()---Write (Binary Zeros) to Descriptor (Large File Enabled)


  Syntax
 #include <unistd.h>

 off64_t fclear
   (int file_descriptor, off64_t nbyte);    

  Service Program Name: QP0LLIB1

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The fclear64() function writes nbyte bytes of binary zeros to the file associated with the file_descriptor. If nbyte is zero, fclear64() simply returns a value of zero without attempting any other action.

fclear64() is enabled for large files. It is capable of operating on files larger than 2GB minus 1 bytes and is capable of clearing up to the system allowed maximum file size bytes as long as the file exists in Root, QOpenSys, and UDFS file systems and has been opened by either of the following:

For additional information about parameters, authorities, error conditions, and examples, see fclear()--Write (Binary Zeros) to Descriptor.

Usage Notes

  1. When you develop in C-based languages, the prototypes for the 64-bit APIs are normally hidden. To use the fclear64() API, you must compile the source with the _LARGE_FILE_API macro defined.
  2. All of the usage notes for fclear() apply to fclear64(). See Usage Notes in the fclear() API.


API introduced: V5R3


Top | UNIX-Type APIs | APIs by category