$ VERIFY_AT_START='F$VERIFY(0)' $ ! BROADCAST.COM $ ! $ IF P1 .EQS. "" THEN GOTO NO_INPUT ! Sanity check $ FOUND_FLAG=0 ! Assume not find user $ USERTERM:=="" ! $ ASSIGN/USER USERSXXX.DAT SYS$OUTPUT ! Data to output file $ USERS ! See who is on system $ OPEN/READ/END=END_OF_FILE INPUT USERSXXX.DAT ! Output data to file $ READ/END=END_OF_FILE INPUT INPUT_LINE ! Read header line $READ_LOOP: ! Read till find name $ READ/END=END_OF_FILE INPUT INPUT_LINE ! in output file $ Length='F$LENGTH(INPUT_LINE)' ! Length of string $ Position='F$LOCATE(P1,INPUT_LINE)' ! Find name $ IF Position .LT. Length THEN GOTO FOUND_USER ! Got user $ GOTO READ_LOOP ! Read till done $FOUND_USER: ! Now find terminal $ FOUND_FLAG=1 ! Found user $ Position='F$LOCATE(":",INPUT_LINE)' ! Terminator for TTXX $ Length=Position+1 ! $ USERTERM:=='F$EXTRACT(0,Length,INPUT_LINE) ! Get the terminal $ IF P2 .EQS. "" THEN GOTO END_OF_FILE ! Check for no message $ REPLY/TERM='USERTERM'/BELL "''P2'" ! Send off the message $ GOTO READ_LOOP ! See if anywhere else $END_OF_FILE: ! $ CLOSE INPUT ! Close the file $ DELETE USERSXXX.DAT;* ! and delete it $ IF FOUND_FLAG .EQ. 0 THEN WRITE SYS$OUTPUT - ! "BROADCAST -- ''P1' is not logged on the system" $ IF VERIFY_AT_START THEN SET VERIFY ! $ EXIT ! $NO_INPUT: ! $ WRITE SYS$OUTPUT "BROADCAST -- No user name input"! $ IF VERIFY_AT_START THEN SET VERIFY ! $ EXIT ! $! $! BROADCAST.COM $! $! This command procedure is called by $! $! @[SYSMGR.CMDFIL]BROADCAST NAME ["Message Text"] $! $! where NAME is the last name of the user whose terminal number you $! wish to find. If the user is logged on, and if "Message Text" is not $! null, the REPLY/TERM command will be used to send the Message to each $! terminal on which that user is logged on to. If the "Message Text" is $! null, no message will be broadcast, rather the global symbol USERTERM $! will be returned to the calling program containing the first terminal $! on which the user is logged in. If the user is not found, USERTERM $! is returned as a zero length string.