The DGADCHLA program communicates with the API through a control block interface called the User Interface Control Block (UICB).

DGADCHLA works in the following sequence:

  1. Optional APIINIT call to anchor print/trace DCB storage when API can be called from multiple subtasks in calling application. This is a one time call from the application main task or a permanent subtask prior to attaching other subtasks that perform API calls. APIINIT is passed in the ninth parameter position.
  2. DGADCHLA accepts IBM® Connect:Direct® command strings from an application program and passes the strings to the API.
  3. The user-written application requests DGADCHLA to perform output formatting routines after returning from the API. These formatting routines display information about the IBM Connect:Direct command that just completed processing.
  4. After execution of each command, DGADCHLA issues a return code reflecting the status of API communications.