TRANSFER Programming Manual
Sample Agent Program Code
Designing and Writing an Agent
069138, Update 1 to 040970 Tandem Computers Incorporated 10–15
Sample Agent Program
Code
The following pages list program code for the sample agent.
 PAGE 1 $JUICE.MLBTFER.AGNT2 TANDEM / SCREEN COBOL-X
 PATHWAY SCREEN COBOL - T9153C11 - (01SEP90) SOURCE LANGUAGE: SCOBOL TARGET MACHINE: TCP/INTERP
 COMPILED: 08 NOV 90 13:30:24 OPTIONS: ON - (LIST,WARN) OFF - (MAP,SYMBOLS,CROSSREF)
 1 ?symbols
 3 IDENTIFICATION DIVISION.
 4
 5 PROGRAM-ID. SAMPLE-AGENT.
 6
 7 * "SAMPLE-AGENT" is the name you would specify on the screen titled,
 8 * "Agent Selection" in ADMIN. See the TRANSFER Installation and
 9 * Management Guide for information on installing agents.
 10
 11 AUTHOR. TANDEM
 12 INSTALLATION.
 13 DATE-WRITTEN.
 14 DATE-COMPILED. 90/11/08 - 13:30:35.
 16 **********************************************************************
 17 * *
 18 * This Sample Agent performs as follows: *
 19 * *
 20 * (1) Forwards all incoming packages to a person specified *
 21 * in the Agent Configuration (See the ADMIN screen titled *
 22 * "Default Agent Configuration", the field titled, *
 23 * "Enter any data needed by the agent on the following *
 24 * line:"). *
 25 * *
 26 * (2) Remove the package from the INBOX. *
 27 * *
 28 * (3) Acknowledge that the package was examined. *
 29 * The message "Package forwarded by sample agent" *
 30 * appears in the INBOX of the correspondent *
 31 * specified on the ADMIN Default Agent Configuration *
 32 * screen ("Enter any data needed by agent" line). *
 33 * *
 34 * The text of the forwarded message does not appear *
 35 * (this decision was made to keep the agent very simple). *
 36 * To see the text, use a Tandem mail client. *
 37 * *
 38 **********************************************************************
 40 ENVIRONMENT DIVISION.
 41
 42 CONFIGURATION SECTION.
 43 SOURCE-COMPUTER. T16.
 44 OBJECT-COMPUTER. T16.
 45
 46 DATA DIVISION.
 47
 48 WORKING-STORAGE SECTION.
 49
 50 ***************************************************
 51
 52 * IPC MESSAGE DEFINITIONS
 53 01 ipc-hdr-block.
 54 * COPY ih-ipc-hdr OF "gcob".
 2< 281 * Definition IPC-HDR created on 12/01/86 at 14:26
 2< 282 05 IH-IPC-HDR.
 2< 283 10 IH-REQUEST-CODE PIC S9(4) COMP.










