DBFRSUP
DBFRSUP is the Run Startup function of DBCHCL.
DBFRSUP sends a request to the Teradata Database to execute the Startup Request stored on the Teradata Database.
How It Works
The startup request is a Teradata SQL request stored on the Teradata Database by means of a CREATE USER or MODIFY USER statement that contains a STARTUP clause.
DBFRSUP performs the following functions:
Note: Upon receiving this return error, the application must invoke DBFDSC.
Then DBFRSUP sends a request to the MTDP:
Submitting the Startup Request
The sequence of operations for submitting the startup request is:
1 Call DBCHCL for DBFRSUP
2 Check that return code is zero
A return code of zero does not imply that the Teradata SQL request was successful. It does imply that the request has been sent to the Teradata Database, that is, the initial status is successful. If the request is successful on the client, the Teradata Database processes it and sends the first portion (buffer-full) of the Teradata SQL response to the client. To verify that the request was successful, call DBCHCL for DBFFET and check that the first parcel in the response stream is not an Error or Failure parcel.
Successful Run Startup Operation
The sequence of operations for a successful run startup operation is:
1 Call DBCHCL for DBFRSUP
2 Check that return code is zero
See “DBFFET” on page 212 for steps to take until response is “consumed” or no longer required (if rewind is required, see “DBFREW” on page 214 and then “DBFFET” on page 212)
3 Call DBCHCL for DBFERQ
4 Check that return code is zero
If the application program calls DBCHCL for the DBFRSUP without first calling DBCHCL for DBFCON, DBCHCL returns with a return code “first do a connect” (NO SESSION 304).
If the call to DBCHCL for the DBFRSUP results in a non-zero return code, the run startup has failed for the reason indicated by the value of the return code. CLI internal structures for the non-existing request can (and should) be de-allocated by calling DBCHCL for DBFERQ. The Output Request Id from the DBFRSUP is the appropriate value to place in Input Request Id for DBFERQ.
The startup request is not to contain a USING clause. Thus, the value of Use Presence Bits is read and stored, but not used.
Interface
The DBFRSUP interface is as follows:
Function: |
DBFRSUP - RunStartUp |
Purpose: |
Perform the DBFRSUP |
Parms: |
|
DBCAREA Parameters
The following fields in the DBCAREA may be read or written to by DBCHCL’s DBFRSUP, depending on the application program’s environment.