To execute the precompiled TPTAPI applications available in the \sample\runsamp directory:
- Change your working directory to <TPTAPI install directory>\sample\runsamp.
- Run the executable that is available in this directory.
For example, to run a 64-bit TPTAPI application built on Solaris Sparc, issue this command at the command prompt:
./runsamp_sol_s_64 tdpid userid password
- After you install Teradata PT you should see the following directory structure:
\lib64 (contains 64-bit .so/.sl files) \tptapi \inc (contains .h files) \sample \blockloading (Shows how to load rows in buffer mode with the load driver) \checkpoint (Shows how checkpoint/restart works with the stream driver) \common (Contains shared files used by all samples) \generic (Shows how each driver works) \getbuffer (Shows how to export the driver’s GetBuffer feature) \inc (Contains shared .h files used by all samples) \multiple (Shows how to use multiple drivers in the same application) \multi_node (Shows how to use the multi-node protocol) \threads (Shows how to write multi-threaded applications) \runsamp ( (Contains precompiled TPTAPI applications) \runsamp_aix_64 (64-bit TPTAPI application built for AIX PPC) \runsamp_sol_o_64 (64-bit TPTAPI application built for Solaris Opteron) \runsamp_sol_s_64 (64-bit TPTAPI application built for Solaris Sparc)
- Become familiar with the Teradata PT methods in the sample programs (.cpp files).
- In the sample makefile, you can see the following settings:
- C/C++ Additional Include
../inc (Teradata PT common headers) ./inc (sample-only header) ../common (sample shared files)
Linker Additional Library Directories:
Run the makefile to build the samples.
Edit the makefile and modify the values of the C++C and CC variables to the location of the compilers on your system. Use a GNU compatible version of make when building the samples on AIX.
- C/C++ Additional Include Directories:
- Set environment variables, if necessary.
On an IBM AIX, when the LANG and LC_FASTMSG environment variables are set to "C" and "true", respectively, the following messages will appear after running a Teradata PT job using the tbuild command:
Message Catalog Error: Message 4000 was not found
Message Catalog Error: Message 2007 was not found
Cause: Environment variable settings
Corrective Action: Use one of the following actions to solve the error messages: change the value for the LANG environment variable to "en_US" or the value for the LC_FASTMSG environment variable to "false". Then rerun the Teradata PT job.
Configuration Data: TPT v12 and TPT v13
- Set the CLIv2 environment variable THREADONOFF to 1 to run the Teradata PT multi-threaded application.
- Change the database system name, user name, and user password in the BTEQ scripts setupTables.bteq and cleanupTables.bteq for each sample.
- Run the BTEQ script setupTables.bteq to set up the tables for the current sample.
- Execute the sample.
- Run the BTEQ script cleanupTables.bteq to clean up the tables used by the current sample.