SuperfilePrepassXtd
Preprocess superfiles to allow rebuilds.
Short Name
CTSBLDX()
Type
Low-Level function
Declaration
COUNT SuperfilePrepassXtd(pTEXT filnam, pTEXT fileword)
Description
SuperfilePrepassXtd() processes the superfile in place. Because a superfile holds numerous c-tree files in one physical file, there are complex inter-file relationships that SuperfilePrepassXtd() function cleans up.
SuperfilePrepassXtd() empties the index files. Each file in the superfile must now be processed by RebuildIFile() before it is usable.
As is the case with RebuildIFile(), the superfile must be closed prior to calling SuperfilePrepassXtd(). Both SuperfilePrepassXtd() and RebuildIFile() open and close the superfile and members.
In single user environments, the fileword parameter, file password, is ignored; i.e., you should pass both parameters, but the second one is ignored.
This operation is available as both a function and stand-alone utility. The function call can be used in single-user and client/server applications. The stand-alone implementation, ctsbld, is available only as a single-user utility.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
SuperfilePrepassXtd() completed successfully. |
12 |
FNOP_ERR |
Could not open file. Check isam_fil for the specific file number. See c-tree Error Codes for more details. |
43 |
FVER_ERR |
Current c-tree configuration is incompatible with file. |
46 |
FUSE_ERR |
File number is already in use. |
48 |
FMOD_ERR |
Operation is incompatible with the file type. |
62 |
LERR_ERR |
Underlying data file must be opened in ctEXCLUSIVE mode. |
165 |
SNFB_ERR |
No file control block is available. |
418 |
SNAM_ERR |
Name inconsistency. |
485 |
|
File sortwork.00x could not be created. Increase fils in c-tree initialization. |
See c-tree Error Codes for a complete listing of valid c-tree error values.
Example
TEXT filnam[64];
printf("\nEnter superfile host name: ");
scanf("%63s",filnam);
if (SuperfilePrepassXtd(filnam, NULL))
printf("\nError on superfile pre-pass, error = %d on file
%d", isam_err, isam_fil);
See also
Functions RebuildIFile(), RebuildIFileXtd() and the ctsbld utility.