6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–7
define write^posted = wbuf[0] #,
 write^mcw = wbuf[1] #,
 write^data = wbuf[2] #;
literal buf^head^size = 2;
Here is the structure of the startup message. When the program runs, infile will
contain the name of the ADCCP line; outfile will contain the name of the home
terminal or other output file.
struct .startup^msg;
 begin
 int msgcode,
 volsubvol[0:7],
 infile[0:11],
 outfile[0:11];
 string params[0:250];
 end;
These strings are used to build the status messages printed on the terminal.
string
 rec^error = 'p' := ["RECEIVED", "### ### ",0],
 async^resp = 'p' :=["ASYNCHRONOUS RESPONSE:",0],
 data^read = 'p' := ["DATA READ BY",12*["'"],"%%%%%% %%%%%% %%%%%% %%%%%% %%%%%% %%%%%% %%%%%% %%%%%% ",0],
 sage^reply = 'p' := [12*["'"]," RSP MOD REQ^ID TEXTOUT TEXTIN ",0],
 SAGE^REPLY1 = 'p' := [12*["'"]," ### ### ###### ############ ",0];
literal fox^msg^size = 52; !words
This is the text that the program sends to the remote station. It is also the text that
the program expects to receive.
int brown^fox^msg = 'P' :=
 ["THE QUICK BROWN FOX JUMPED OVER THE LAZY MAN'S BACK.",
 "the quick brown fox jumped over the lazy man's back."];
?NOLIST
?SOURCE $SYSTEM.SYSTEM.EXTDECS(ABEND,AWAITIO,CLOSE,CONTROL,DEBUG,DELAY,
? FILEINFO,LOOKUPPROCESSNAME,NUMIN,NUMOUT,readupdate,reply,
? GETCRTPID,MOM,MYPID,NEWPROCESS,TIME,MYSYSTEMNUMBER,
? processorstatus,processinfo,lastaddr,checkopen,checkpoint,
? monitorcpus,checkmonitor,lastreceive,deviceinfo,timestamp,
? OPEN,READ,SETMODE,STEPMOM,STOP,WRITE,WRITEREAD)
?LIST
Procedure to timestamp the messages printed on the home terminal.
proc stamp^msg(s);
 string .s;
 begin
 int .time^array[0:6];
 call time(time^array);
 call numout(s[0],time^array[3],10,2);
 s[2] := ":";
 call numout(s[3],time^array[4],10,2);
 s[5] := ":";
 call numout(s[6],time^array[5],10,2);
 s[8] := " ";
 current^time := $dbl(time^array[5] + time^array[4] * 60) + $dbl(time^array[3]) * 3600D;
! seconds minutes hours
 return;
 end;










