Once Demographics Library has been initialized, there are many options available through the Demographics Library functions. One approach is outlined below:
- Initialize Demographics Library using DlSetLicense and DlInit.
- Open one or more data files using DLFileOpen.
- Get data file attributes using DlFileGetAttribute.
- Search data file for key information using DlFileSearch.
- Specify a field using DlFieldGet or DlFieldGetN.
- Return data for the field located in step 5 using DlFieldGetString, DlFieldGetNum, DlFieldGetAttribute, DlFieldGetValueAttribute
- Repeat steps 4, 5 and 6 as necessary.
- Close open data files using DlFileClose.
- Close Demographics Library using DlTerm.
Sample Program contains the code listing for a sample program in C illustrating the use of Demographics Library as outlined above. A complete version of this program (DEMOTEST.C) can also be found on your distribution disk in the Demographics Library directory.
DL.H
The C header file DL.H (the file may have different extensions and function definitions for other development systems) contains all symbolic constants used or returned by the Demographics Library functions. This file is extensively commented and it is recommended that you review this file before using any Demographics Library functions.
Using Demographics Library in Windows
To successfully use the Demographics Library in Windows, be sure one of the following symbols is defined:
__NT__
Using Demographics Library in UNIX
When using Demographics Library in UNIX, be sure the following symbol is defined:
__UNIX
On 64-bit machines, the following symbol must also be defined:
__64BIT
The static library file name is libdemolib.a on all UNIX platforms. The shared library file name is libdemolib.so for AIX and Solaris, and libdemolib.sl for HP-UX. The symbolic link on all UNIX platforms is libdemolib.so/sl.38.04.