Previous Page Contents Page Next Page

2.5 Specifying the Local TP Name

When a program issues the Initialize_Conversation, Initialize_Conversation_For_Incoming, or Accept_Conversation call, the CPI-C library generates an instance of a transaction program (TP). You can specify the name of this TP in a number of different ways, described below.

The methods are listed in order of precedence. This means that, if you specify a name using the first method, the CPI-C library uses this name and ignores any name that you specify using the second or later methods. If you do not use the first method but specify a name using the second method, the CPI-C library uses this name and ignores any name that you specify using the third or later methods, and so on.

Note

The local TP name is distinct from the partner TP name set in the Set_TP_Name call.

2.5.1 Specify_Local_TP_Name

The program can use this call to specify the TP name.

2.5.2 Context

If there is another TP from which the context is copied, the TP name is taken from that other TP. For more information about context, see Multiple Conversations.

2.5.3 APPCTPN Environment Variable

The TP name can be specified using the APPCTPN environment variable.

On Solaris systems the TP name is specified in the APPCTPN environment variable. This environment variable can be set in the following ways:

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.

2.5.4 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.

Previous Page Contents Page Top of Page Next page