API for the C Programming Language

Data Archiving for Adabas provides an application programming interface for the C Programming Language which enables three interfaces:

Batch Interface

This interface allows you to control, monitor, and report archive and transfer Activities directly from your own infrastructure.

To-Do List Interface

As an alternative to using Extraction Syntax for data selection, this interface allows you to select data to be archived or transferred using your own custom applications by maintaining business objects (collections of related Adabas ISNs) in a repository file. An Action can then be run which references these business objects and performs the appropriate archiving/transfer operations against the corresponding records. Please refer to Data Selection Mode for information on how to define an Action to run in To-do list mode.

User Library Interface

This interface allows you to create your own record selection plug-in. By implementing the User-Lib interface in your own custom DLL/Lib, it will be auto-discovered by the Data Archiving Service and offered as a data selection mode in the User Interface. When this mode is selected, the custom DLL/Lib will be called to provide the appropriate business objects (collections of related Adabas ISNs) for processing. Please refer to Data Selection Mode for information on how to define an Action to run in User Library mode.


Installing the API

The application programming interface for the C programming language is provided in the form of a DLL/Lib and supplied in the product’s sdk directory as part of the standard installation.

Implementing the API

For detailed information on developing applications using the application programming interface refer to the adr_api.pdf document located in the product’s sdk/doc directory.

API Functions

The application programming interface for the C programming language provides three interfaces that allow you to drive archiving and transfer operations.

Batch Interface

The batch interface allows your own custom application to perform the following functions:

Function Description
ACTIVITY-INFO Returns detailed information about a current Activity.
ACTIVITY-LIST Returns individual lists of Activity-IDs, Databases, and Computers for all current Activities.
ARCHIVE Starts a current Activity for a specified Action.
COMPUTER-STATUS Returns status-related counts for all current Activities processing on one or more specified computers.
DATABASE-STATUS Returns status-related counts for all current Activities processing on one or more specified databases.
LIST Lists archives in the Vault.
PAUSE Pauses a current Activity.
RECALL Recalls a particular Archive for a specified Action.
RESTART Restarts a failed Activity.
RESUME Resumes a paused Activity.
STOP Stops a current or paused Activity.

To-Do List Interface

The To-Do list interface allows your own custom application to perform the following functions:

Function Description
CLOSE Closes the To-Do list, allowing the user to leave it in a state where it can be modified (INSERT, ERASE, REPLACE) or submits it ready for processing by the archiving service ready for when it’s next commanded to run.
CREATE Creates a new empty To-Do list for a specific Group, Plan, and Action.
ERASE Deletes an existing business object (collection of related ISNs) from an open To-Do list.
INSERT Inserts a new business object (collection of related ISNs) into an open To-Do list.
OPEN Opens an existing To-Do list for modification (INSERT, ERASE, REPLACE).
REMOVE Deletes an existing To-Do list regardless of its state.
REPLACE Replaces an existing business object (collection of related ISNs) in an open To-Do list.

User Library Interface

The User-Lib interface allows your own custom DLL/Lib to perform the following functions:

Function Description
OPEN Establishes a connection to the custom DLL/Lib and allows for a series of parameters to be passed to it.
FIRST The custom DLL/Lib returns the first business object (collection of related ISNs) to the Extractor.
NEXT The custom DLL/Lib returns the next business object (collection of related ISNs) to the Extractor.
NOTIFY Notification call-back to allow the custom DLL/Lib to implement some form of transaction management and restart/recovery mechanism based on the state supplied in the call back by the Data Archiving Service.
CLOSE Terminates the connection to the custom DLL/Lib and allows it perform any tidy up operations etc.
STAT Retrieves the statistics for an archive.

Messages and Codes

Refer to the adr_api.pdf document located in the product’s sdk/doc directory.