6100 ADCCP Programming Manual

Application Tasks
Writing Applications that Use ADCCP
4–2 069225 Tandem Computers Incorporated
Opening the Line Before an application can send or receive data over a line, it must first open a line.
To a open a line, you use the following Guardian 90 file-system procedure calls in your
application:
DEVICEINFO
OPEN
FILEINFO
NUMOUT
WRITE
AWAITIO
ABEND
SETMODE
Of these eight calls, the OPEN procedure is one that opens the line. DEVICEINFO,
FILEINFO, NUMOUT, WRITE, and ABEND are used for error handling. AWAITIO
and SETMODE handle I/O processing.
The following two examples shows how these procedure calls are used to open a line.
Descriptions of the Guardian procedures and their parameters follow the example.
This example shows how a line could be opened using he Transaction Application
Language (TAL).
Proc open^line;
begin
call DEVICEINFO(startup^msg.infile,type,reclnth);
if type.<4:9> <> 51 or type.<10:15> <> 2 then
begin
@ptr := @startup^msg.infile '<<' 1;
sbuf ':=' ptr for 9 -> @ptr;
if not type then
ptr ':=' "is not a 6100 ADCCP line." -> @ptr;
call WRITE(outfile,outbuf,@ptr '-' @sbuf);
call AWAITIO(outfile);
call ABEND;
end;
sbuf ':=' "OPEN ERROR " -> @ptr;
call OPEN(startup^msg.infile,rfnum,14);
if <> then
begin
call FILEINFO(rfnum,error);
call NUMOUT(ptr,error,10,3);
ptr[3] ':=' " on 1st open." -> @ptr;
call WRITE(outfile,outbuf,@ptr '-' @sbuf);
call AWAITIO(outfile);
call ABEND;
end
else begin
call SETMODE(rfnum,30,1);
end;
end;