 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1985. All rights reserved
OVERVIEW:
This example will demonstrate the use of $ASSIGN and $QIOW system
services. The $QIOW will output a character string to the terminal.
CAUTION: This sample program has been tested using PL/I V2.2 on
VAX/VMS V4.1. However, we cannot guarantee its effectiveness because
of the possibility of error 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 EXAMPLE:
QIOW: PROCEDURE OPTIONS(MAIN);
%INCLUDE SYS$ASSIGN;
%INCLUDE SYS$QIO;
%INCLUDE $STSDEF;
DCL CHAN FIXED BIN(15);
DCL IO$_WRITEVBLK GLOBALREF FIXED BIN(31) VALUE;
DCL STRING CHARACTER(44)
INIT('This tests an output string from $QIOW');
DCL IOSB(4) FIXED BIN(15);
DCL DESCRIPTOR BUILTIN;
/* Assign a Channel to the terminal. The Logical TT should contain
the terminal number */
STS$VALUE = SYS$ASSIGN ('TT', CHAN, , );
IF ^STS$SUCCESS THEN SIGNAL VAXCONDITION(STS$VALUE);
/* Output a character string using QIOW. Note that the example is
not using the Event Flag, AST, AST argument and P3 thru P6 arguments */
STS$VALUE = SYS$QIOW( , CHAN,
IO$_WRITEVBLK,
IOSB,,,
STRING,
44,,,,);
IF ^STS$SUCCESS THEN SIGNAL VAXCONDITION(STS$VALUE);
END QIOW;
|
buy online or call 1.800.AT.COMPAQ
|
|