HP-UX SNAplus2 CPI-C Programmer's Guide (June 2003)

Writing CPI-C Applications
Specifying the Local TP Name
Chapter 2 89
APPCTPN Environment Variable
The TP name can be specified using the APPCTPN environment
variable.
For Unix On HP-UX systems the TP name is specified in the APPCTPN
environment variable. This environment variable can be set in the
following ways:
The program can issue a putenv() call
You can set it in the HP-UX shell. For example, in the Korn shell you
would issue the following command:
export APPCTPN=MYTP
If you are using automatically started invoked TPs, you can set it
using the environment field of the SNAplus2 invokable TP data file
For Windows On Windows systems the TP name is specified in the registry. The
registry key is
\\HKEY_LOCAL_MACHINE\SOFTWARE\SNA
Client\SxClient\Parameters\MyExeName
where MyExeName is the file name of the program, without the .exe
extension.
The APPCTPN value under this registry key specifies the TP name.
End of Section Default Value
If the TP name is not set by any of the methods described in the previous
sections then it is set to the default value CPIC_DEFAULT_TPNAME.