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

Writing CPI-C Applications
How Programs Get Started
Chapter 2 93
How Programs Get Started
A conversation occurs between an invoking program and an invoked
program. The invoking program is started by a user entering a command
or by a batch command. The invoked program can either be started
manually by a user or automatically by SNAplus2.
Invoked Program: Automatically Started
An invoked program can be configured to start automatically under one
of the following conditions:
The first time an inbound allocation request is received by the LU
that serves the invoked program. A program started in this manner
is called a queued, automatically started program (or queued
auto-started TP).
If the invoked program is not running, the first inbound allocation
request starts it; a response to the allocate request is held until the
Accept_Conversation or Accept_Incoming call in the invoked
program is executed.
If the invoked program is already running, the inbound allocation
request waits until the invoked program issues another
Accept_Conversation or Accept_Incoming call, or until it finishes
running and can be restarted.
Each time an inbound allocation request is received by the LU that
serves the invoked program, a new instance of the program is loaded
and started. A programstarted in this manner is called a nonqueued,
automatically started program.
In general, the inbound allocation request waits until the invoked
program is started and issues an Accept_Conversation or
Accept_Incoming call. However, the definition of the invoked program's
local LU includes a timeout value, so that the inbound allocation request
fails if the timeout is reached before the invoked program issues an
Accept_Conversation or Accept_Incoming call.
The definition of theinvoked TP (in the SNAplus2invokable TP data file)
includes a second timeout value, which determines how long an
Accept_Conversation or Accept_Incoming call waits for an inbound
allocation request. The call fails if this timeout is reached before an