6100 ADCCP Programming Manual
ADCCP Programming Example Using Transaction Application Language (TAL)
069225 Tandem Computers Incorporated B–25
Complete an outstanding RECEIVETEXT request. Continue the loop until there are
no more RECEIVETEXT requests outstanding.
do
begin
call awaitio(rfnum,,,tag,1D);
call fileinfo(rfnum,error);
inttag := $int(tag);
if not error and (inttag=1 or inttag= 2 or inttag=3)
Report the results. Note that the way to "cancel" a request is to complete it and
ignore the data.
then begin
sbuf[9] ':=' "CANCEL^IO^PIPES sucked up a read." -> @ptr;
call write^err^msg;
end
else if error then
if error = 40 or error = 26 then !OK
else
begin
sbuf[9] ':=' "CANCEL^IO^PIPES READ error: " -> @ptr;
call write^err^msg;
end ;
end
until error = 26;
read^posted := false;
Complete an outstanding SENDTEXT request. Continue the loop until there are no
more SENDTEXT requests outstanding.
do
begin
call awaitio(wfnum,,,tag,1D);
call fileinfo(wfnum,error);
if error then
if error = 40 or error = 26 then !OK
else
Report an error, if necessary.
begin
sbuf[9] ':=' "CANCEL^IO^PIPES WRITE error: " -> @ptr;
call write^err^msg;
end ;
end
until error = 26;
call some^more^init; !re-init write buffers
end;
This procedure starts a session by identifying the station as active and issuing a
SABM.
int subproc start^session;
begin
int(32) wait^time;
call cancel^io^pipes; !be safe - cancel any dangling ios
D.MSG.TEXT.BYTE[1] := 1; !station id
D.MSG.TEXT.BYTE[2] := active; !reset ERRORSTOP bit
call receive(RFNUM,,2,0,ltf^changelist,$LEN(d.basic));
wait^time := 1000D; !wait 10 seconds