TRANSFER Programming Manual
Selecting a Programming Language
Designing and Writing an Agent
10–2 069138, Update 1 to 040970 Tandem Computers Incorporated
Selecting a
Programming
Language
TAREQs are composed of SCREEN COBOL programs and, therefore, they interact
with agents that are implemented either as SCREEN COBOL requester programs or as
PATHWAY servers. Agents can operate as either requesters or servers, as follows:
An agent that requires ongoing access to the TRANSFER database should be
written in SCREEN COBOL. For example, if your agent will make requests of
TRANSFER server classes to retrieve, save, or send packages, use SCREEN
COBOL. In this role, an agent can be regarded as a specialized client.
An agent that fits the following criteria should be written in COBOL, FORTRAN,
TAL, Pascal, or C:
The agent frequently accesses only GUARDIAN 90 files, input/output
devices, or databases that are not part of the TRANSFER delivery system.
The agent is not heavily involved in any database access.
The agent performs string handling, complex computations, or work of long
duration.
The TCP will not be involved in this agent's activity and will be free for other
operations. The invoking TAREQ, however, will not be free because it waits for
the agent.
An agent that performs both kinds of work is generally written in SCREEN
COBOL and makes requests of a special server provided by your application.
SCREEN COBOL agents run in the same TCP as the TAREQs that invoke them. The
communication between agent and TAREQ is program unit-to-program unit and
never TCP-to-TCP.
The program unit for the TAREQ is located in the TAREQ SCREEN COBOL object
code files (TAREQCOD and TAREQDIR). Locate a SCREEN COBOL agent in one of
the following ways:
Compile the SCREEN COBOL agent and copy the program unit into the TAREQ
SCREEN COBOL object code files by using the SCREEN COBOL Utility Program
(SCUP). Refer to the PATHWAY SCREEN COBOL Utility Program (SCUP)
Reference Manual for a description of SCUP commands.
Compile the SCREEN COBOL agent and locate the program unit in a SCREEN
COBOL object code file other than the one in which TAREQ resides. You can then
supply the PATHCOM TERM TCLPROG parameter for the TAREQ and specify
your agent program unit object file as the TCLPROG file name. Refer to the
PATHWAY PATHCOM Reference Manual.
An agent required by a package delivery is invoked only if the delivery is successful.
The same agent can be associated with several depots, but no depot is required to have
an agent. Conversely, many agents can be associated with the same depot.
TAREQs invoke agents in accordance with selection criteria recorded in the recipient's
agent profile. You can establish agent selection criteria interactively through the
ADMIN client provided by the TRANSFER delivery system or programmatically