Posted By: David Faust
Giving you fast access to your data is what c‑treeACE is all about. however, there are times when what you need is not access to your data, but information about your data: data about the data. For example, consider how useful it might be to have a maintenance utility that shows the number of users logged in, the server serial number, or even the number of partitioned files for file system maintenance. Many other attributes can be returned as well: c‑treeACE serial numbers, data alignment, working directory paths, and much more.
Making use of these extended API calls can reveal a wealth of information about your c‑treeACE data.
A variety of information about a file is stored in the file header. However, the c‑treeACE header is generally not directly accessible. Use this API call to retrieve many of these values.
- ALIGN – Data alignment of field types
- FRSACTPRT – First active partition number
- LSTACTPRT – Last active partition number
- NUMACTPRT – Number of active partitions
- NKYMEM – Number of index members in index file
- NODSIZ – Index node size
- XFLMOD – Extended file attributes (HUGE file, Memory file, Add to end file, Partition Host, Restorable Delete, Six Byte Transaction enabled, etc.)
Some very useful file information is not actually stored in the file header at all. These values can be readily retrieved with this API call.
- FILNAM – return the name of the file
- FILPTH – returns the LOCAL_DIRECTORY path setting (Server only).
- WRKDIR – return the server’s working directory (Server only).
- SRVNAM – return the server name (Server only).
Custom values can be set in the server configuration file with the APP_NAME_LIST configuration option. Use this option when you require a central store of values shared between applications or clients.
- FIRST_ITEM – with filno = -1, returns the first item in the APP_NAME_LIST definition within the c‑treeACE configuration. Ifbuflen is too small, VBSZ_ERR (153) is returned.
- NEXT_ITEM – with filno = -1, returns the next item in the APP_NAME_LIST definition by the c‑tree Server. Error INOT_ERR(101) is returned when the list of names is exhausted.
A wealth of system level c‑treeACE environment information is available. This list is only a small selected portion of available information for applications about their working c‑treeACE environment. Consult the full documentation of the API call for the complete listing.
- cfgLOGONS – Number of current clients logged into the server
- cfgUSERS – Maximum number of clients that have logged into the server
- cfgPATH_SPARATOR – ASCII value of the file name path separator
- cfgSERIALNBR – Server serial number
- cfgWORD_ORDERapp – Client data order (0 signifies LOW_HIGH)