Types of functions

The provided functions that make up the collection library are divided into three types:
  • Collection functions

    A collection is a related group of elements organized within a data store. Collections are created by applications and may be temporary or persistent. The collection APIs allow collection creation and deletion and element manipulation and interrogation. Collections include abstractions such as array, set, bag, and key sorted set. Most z/TPFCS functions are atomic; that is, the element is read into storage, managed, and removed from storage for each function call.

  • Cursor functions

    Cursors provide you with convenient methods for accessing and iterating through the elements stored in the collections. The cursor APIs allow element manipulation and interrogation. Cursors can also be used to lock collections to prevent other users from updating a collection while you are accessing the elements in the collection. Furthermore, cursors allow parts of collections to stay in memory so that some repetitive or consecutive accesses do not require data to be constantly read from or written to DASD. It also allows you to use alternate key paths.

  • Auxiliary functions
    The auxiliary functions include dictionary, browser, and other miscellaneous functions:
    • Dictionary functions are used to access the data store and z/TPF dictionaries. This allows applications to access a collection without having to know the actual PID of the collection.
    • Browser functions allow you to do tasks such as the following:
      • Display information about a collection
      • Display the contents of a collection
      • Delete or reclaim a collection
      • Capture and restore a collection
      • Validate the integrity of a collection
      • Reconstruct a collection that has errors.

      For more information about z/TPFCS functions, see the z/TPF C/C++ Language Support User's Guide.