It may seem a bit premature to close the database having only just described how to open it, but some things are best explained at this stage. In an ADAM environment the routine AGI_CANCL cancels the association of the specified parameter and performs specific tidying up operations concerning that parameter. If the parameter association has to be retained outside the program then AGI_CANCL should not be called.
If the workstation structure is opened by AGI_OPEN, a call to AGI_CLOSE should be used to close it.
General tidying up operations (e.g. closing the database) are performed
when the last active identifier has been annulled, either with
AGI_ANNUL or
AGI_END. It is important that tasks clean
up all their identifiers otherwise unusual side effects may occur if
the executable image is permanently resident in memory (such as an
ADAM task).
AGI --- Applications Graphics Interface Library