16.20 - Executing a RunStartUp Request - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

The user’s startup string is not automatically executed when a connection is established through CLIv2. Instead, the startup string is executed by issuing a RunStartUp request. The RunStartUp request can be issued at any time during the execution of the program.

The following information is presented as though the connection to Teradata Database is already established.

To run a startup string after the session is established, an application must perform the following steps:

  1. Modify the DBCAREA.
    1. Set the Function to RunStartUp.
    2. Set the Input CLIv2 Session Id to the Output CLIv2 Session Id obtained when the session was established.
    3. Optionally set the following:

      Request-buffer-length

      Request-parcel-format

      Response-buffer-length

      Anticipated-number-of-concurrent-sessions

      Request-token

      USING-data-pointer

      USING-data-length

      USING-data-count

      USING-data-length-vector

      USING-data-pointer-vector

      Data-encryption

      Message-area-pointer

      Message-area-length

      Any option values required (remember to set Change-options = Y if any option values are changed)

  2. Call DBCHCL to perform the RunStartUp function, then checks the return code from DBCHCL:
    Return Code. Result
    0 Call DBCHCL to perform a Fetch function (see Fetching the Response for a Request) until the complete response has been processed.
    anything else Process the return code and DBCAREA message.
  3. Call DBCHCL to perform the End Request function (see Ending a Request).

The runstartup string can contain either a macro requiring input parameters or a request with a USING row descriptor. In this situation, the application must pass the address and length of the data area to CLIv2. The USING-data-pointer and USING-data-length fields of the DBCAREA are provided for this purpose.