6100 BSC Programming Manual
 BSC Example
?PAGE"INITIALIZATION"
!*********************************************************************
!
! Function: open the terminal and the line. After the open to the line,
! a set^configuration message to the CLIP (this is optional,
! as open will set SYSGENed configuration message to CLIP if
! the AUTOCONF modifier was used).
! The next thing it does is send connect^request which
! raises DTR. Then it posts the first read on the line.
! An AWAITIO is owed to this request. A "?" is also
! posted on the terminal with the WRITEREAD.
!
! Called by : MAIN
!
!*********************************************************************
PROC INITIALIZE;
BEGIN
STRUCT .STARTUP;
 BEGIN
 INT MSG^NUM,
 DEFAULT[0:7],
 INFILE [0:11],
 OUTFILE[0:11];
 END;
INT error,count,
 file^name [0:11],
 devnum,
 devtype;
STRING status = error;
 term^buff ':=' ["$RECEIVE", 8 * [" "]];
 CALL OPEN (term^buff, term^file);
 IF <> THEN CALL DEBUG;
 CALL READ(term^file,STARTUP,$LEN(STARTUP));
 IF < THEN CALL DEBUG;
 CALL CLOSE (term^file);
 !OPEN THE TERMINAL, NOWAIT
 CALL OPEN (STARTUP.INFILE, term^file, 1);
 IF <> THEN CALL DEBUG;
 !OPEN THE COMM LINE, NOWAIT
 CALL OPEN (STARTUP.OUTFILE, comm^file, 7);
 IF <> THEN
 CALL DEBUG;
 s^cpline^buffer.clip^req^hdr.func ':=' clip^set^cfg^req for 2;
 reqid := (reqid '+' 1);
 cpline^buffer.clip^req^hdr.reqid := reqid; !SET THE CLIP
 cpline^buffer.clip^req^hdr.txtout^len := config^len; !CONFIG.
 B-18










