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

Writing CPI-C Applications
Specifying the Local TP Name
Chapter 288
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 namethat 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 libraryuses this name and ignoresany name that you
specify using the third or later methods, and so on.
For invoking programs, the TP name is only used as an identifier in
log and trace files.
For operator-started invoked programs, the TP name must be set
correctly because the value is used to route inbound allocation
requests to the appropriate program. The Accept_Conversation, or
Accept_Incoming call from the invoked program completes when an
inbound allocation request arrives for this TP name.
For automatically-started invoked programs, the TP name need not
be specified because it is taken from the inbound allocation request.
NOTE The local TP name is distinct from the partner TP name set in the
Set_TP_Name call.
Specify_Local_TP_Name
The program can use this call to specify the TP name.
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” in Chapter 1.