17.10 - Executing a Startup Request - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
17.10
Release Date
October 2021
Content Type
Programming Reference
Publication ID
B035-2418-061K
Language
English (United States)
An option, usually taken by interactive programs, allows the application program to execute the user’s startup request, which is a Teradata SQL request that was stored earlier with the database. In the DBCAREA, the application:
  • Supplies the session id, if the DBCAREA has been used for any other session since last used for this session
  • Supplies the length of and a pointer to the input data, if the STARTUP string contains a Teradata SQL statement with a USING modifier
  • Changes the setting of the processing options
  • Supplies the length of and a pointer to the Move area, if the Move Mode processing option was chosen
  • Supplies the function code to the Run Startup Request (DBFRSUP)

The application then calls DBCHCL.

DBCHCL

DBCHCL prepares either a RunStartup, IVRunStartup or FMRunStartup parcel in the message body of the Request Buffer depending on the value of the Record Mode options flag, and then prepares a Resp or KeepResp parcel depending on the value of the Keep Mode flag, and a Data or Indic data parcel if the Teradata SQL request contained a Teradata SQL statement with a USING modifier in the Request Buffer.

In the MTDP Control Block, DBCHCL provides a pointer to the Request Buffer and the length including the LAN header structure, of the data in the buffer, provides the length of and a pointer to the Response Buffer, sets the selfrecov option (if needed), and sets the function code to MTDPSTA. DBCHCL then calls MTDP.

MTDP

MTDP prepares and sends a Start Request message to the database. It then returns control to DBCHCL.

DBCHCL

If the return code in the MTDP Control Block is normal and the wait data option for the run startup request is set to Y, DBCHCL sets the wait data option in the MTDP control block to TRUE, sets the function code to MTDPRET, and calls MTDP.

MTDP

MTDP checks to see if the Start Response message has been received from the database. With the wait data option set to “on,” MTDP will wait for the arrival of the Start Response message and then return control to DBCHCL.

DBCHCL

Based on the return code in the MTDP Control Block, DBCHCL generates an error or success message string in the message field of the DBCAREA and DBCHCL returns control to the application program.

Application

If the return code in the DBCAREA is not normal, the application program makes the appropriate changes and re-submits the DBCAREA to DBCHCL, as above. Otherwise, the application program saves the request id if the application program plans to use the DBCAREA for any other request concurrently. The application consumes the Teradata SQL response as it would any other, see below. The interface is then ready to process regular Teradata SQL requests.