The Demographics Library functions all use a common internal data structure that is initialized with a call to D1Init. This function returns a handle, D1Id, which is then passed to other Demographics Library functions. A handle is a token that lets a program access some resource, usually a file or a location within a file. Other Demographics Library functions that return handles are DlFileOpen, DlFieldGet, and DlFieldGetN. Upon completion of the Demographics Library session, a call to DlTerm frees the memory allocated by DlInit and closes all files used by Demographics Library. After a call to DlTerm, any handles that were returned by the Demographics Library are now invalid.