 |
» |
|
 |
|
 |

Copyright (c) Digital Equipment Corporation 1985. All rights reserved
OVERVIEW:
The example program in this article will demonstrate how to use $BRKTHRUW
to send a message to a specified terminal.
CAUTION: This sample program has been tested using PL/1 2.3 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:
BRK: PROCEDURE OPTIONS(MAIN);
%INCLUDE SYS$BRKTHRU; /* VALID ONLY FOR PL/1 V2.3 */
%INCLUDE $BRKDEF; /* VALID ONLY FOR PL/1 V2.3 */
%INCLUDE $STSDEF;
DCL MSGBUF CHARACTER(26) INIT('This is a test of $BRKTHRU');
DCL SENDTO CHARACTER(9);
DCL IOSB(4) FIXED BIN(15);
/* Request the terminal to send the message to */
PUT SKIP LIST('ENTER TERMINAL TO SEND TO: ');
GET LIST(SENDTO);
/* Call $BRKTHRUW */
STS$VALUE = SYS$BRKTHRUW(,MSGBUF,
SENDTO,
BRK$C_DEVICE,
IOSB,,,,,,);
IF ^STS$SUCCESS THEN SIGNAL VAXCONDITION(STS$VALUE);
IF IOSB(1) > 1 THEN SIGNAL VAXCONDITION(IOSB(1));
PUT SKIP LIST('$BRKTHRU TEST COMPLETE');
END BRK;
|
buy online or call 1.800.AT.COMPAQ
|
|