TRANSFER Programming Manual

11 A Sample TRANSFER Program
40970 Tandem Computers Incorporated 11–1
The TRANSFER client described on the following pages is an example of a TRANSFER
program that issues only five UOWs yet performs a useful task. This program, the
agent tester, facilitates developing a user-written agent by bypassing the interface to
the TRANSFER asynchronous requesters (TAREQs). The agent tester uses the same
linkage data that TAREQs use to call the agent. Calling the agent, selecting which
message the agent should use, and establishing an INSPECT session are therefore
simplified.
Another sample client is listed in Section 9; a sample agent is listed in Section 10.
Note This code is intended as an example only. It is meant to be used for reference purposes and does not
necessarily show the best or only way for you to code your particular application.
UOWs The agent tester code sends the following UOWs to the TRANSFER Interactive Server
(TISERV):
START-SESSION
END-SESSION
SCAN-FOLDER
GET-ITEM-DESCR
GET-ITEM-REC
Agent Tester Sample
Session
The following pages describe a sample session in which no errors are encountered. In
this session, the agent tester is told to scan the INBOX belonging to Jane Roe. The
program finds a message from Joe Blow with the subject "Test message #1." The
program calls the sample agent, passing it this message and the name of the person to
whom the sample agent should forward the message (Tina Gato).