#include "ciflib.h"
int cifInit(const char *ddlFilename,
const int verify,
const int verbose)
cifInit performs all initialization functions for CIFLIB. This function must be called before any other CIFLIB functions. cifInit reads the named DDL file and optionally performs data integrity checks on this file with respect to the DDL 2.1 vocabulary. Normally, cifInit is called to read the DDL and to build the schema into which a dictionary can be loaded. A CIF dictionary is then read using cifReadFile and specifying the DDL as the validation dictionary. Data files are then read using cifReadFile and specifying the CIF dictionary as the validation dictionary. The value of the verify argument determines if integrity processing is performed in all subsequent read operations. If the verbose argument is selected then CIFLIB will generate informational messages describing its internal operations.
Returns 1 if the function could successfully parse the input DDL file, or 0 if an unrecoverable parsing error occurs. Even if the file is successfully parsed, warning and error messages may exist which can be examined using the routines described in Section 2.14. cifInit returns the following additional codes:
CIF_ALLOCATION_FAILURE | memory allocation error |
CIF_NOT_EXIST | missing DDL file |
CIF_OPERATION_DISALLOWED | miscellaneous error |
CIF_OPERATION_PERMISSION_DENIED | file permission error |
See also: | cifFree |
cifReadFile |