 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1988. All rights reserved
LAYERED PRODUCT: PLI, VERSION 3.1 OP/SYS: VMS, VERSION 5.0
SOURCE: Digital Customer Support Center
OVERVIEW:
This program does a simple write to a terminal using the system
service SYS$QIO.
CAUTION: This sample program has been tested using: PLI, Version 3.1
on VMS, Version 5.0. However, we cannot guarantee its effectiveness
because of the possibility of errors in transmitting or implementing
it. It is meant to be used as a template for writing your own
program, and it may require modification for use on your system.
PROGRAM NOTES:
The program first obtains a channel with SYS$ASSIGN. The program then
writes a message to the terminal using the IO$_WRITEBLK function with
a QIO. For more information regarding QIOs, see the "System Services"
manual under SYS$QIO. In addition, look in the "I/O Users Guide" in
the terminal driver section for more information on the P1 through P6
arguments.
PROGRAM SAMPLE:
qioterm: proc options(main);
%include SYS$QIO;
%include $iodef;
%include SYS$assign;
%include $STSDEF;
%include $SSDEF;
dcl term char(10) init('sys$output');
dcl termch fixed bin(15);
dcl iosb(4) fixed bin(15);
dcl P1 char(34) init('This is a QIOW write to a terminal');
/* assigning the channel */
sts$value = SYS$ASSIGN(term,termch,,);
IF ^sts$success
then do;
put skip list('Problems with assign');
signal vaxcondition(sts$value);
end;
/* perform the qio to display the message on the terminal*/
sts$value = sys$QIOW(,termch,IO$_WRITEVBLK,IOSB,,,p1,34,,,,);
IF ^sts$success
then do;
put skip list('Problems with QIOW');
signal vaxcondition(sts$value);
end;
if IOSB(1) ^=ss$_normal
then do;
put skip list('Problems with QIOW iosb:',iosb(1));
signal vaxcondition(iosb(1));
end;
end qioterm;
|
buy online or call 1.800.AT.COMPAQ
|
|