15.10 - Connecting to the Teradata Database - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Preprocessor2 for Embedded SQL
Programming Reference

No association exists between the PP2 connection to the Teradata Database made at precompile time and the connection made by an application at execution time. Embedded LOGON and CONNECT statements have no effect on the PP2 connection. Conversely, tdpid and userid PP2 options do not affect the application logon at execution time. For more information, refer to “USERID(userid[,password[,accountid]]) -u userid[,password[,accountid]]” on page 90.

Normal operation, however, means connecting to the Teradata Database for the precompilation and application execution phases. This requires the:

  • tdpid
  • userid
  • password for the specified userid
  • If a tdpid is not specified, the connection is made using the system default. The runtime returns a positive SQLCODE value and sets SQLWARN0 and SQLWARN2 to ‘W’.

    The next table lists the system defaults for IBM mainframes and network‑attached systems.



    Default tdp

    IBM Mainframe

    The default tdp is obtained from the HSHSPB data area module (see Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems (B035‑2417) for details.)

    Network‑Attached System

    The mtdpid is obtained from the user‑defined clispb.dat file or the CLI2SPB data area.

    For more information about userid security, tdpids, and userids, see Teradata Director Program Reference (B035‑2416).