The linked list routines enable you to maintain a linked list on the file stack. Because they use the file stack routines (which have a built‑in cache), these routines are ideal if you need a mechanism for managing an ordered linked list of items of the same size without a restriction on the number of items, and with automatic paging to disk as needed. (See “Appendix E: File‑Stack Processing” for information on the file stack routines.)
With the linked list routines you can insert or delete records anywhere in the list, and you can retrieve the first, last, previous, next or previously marked record. You can also update the current record and swap the position of adjacent records.
You pass these routines a control structure, defined in lnklst.def, to indicate which linked list on which file stack you are accessing, as well as the current state of that list. The data in the control structure is read‑only to calling routines.