[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

659.0. "/BRDCSTMBX" by STOPIT::BADMAN () Tue Jan 12 1988 09:42

    Can anybody help me ?
    
    
    	I am trying to use the DCL command
    
    
    		"SET TERM/BRDCSTMBX"
    
    	but the documentation as to its full use and definition is very
    limited. Am I right to assume that a mailbox must be created beforehand
    and that $ASSIGN must then be used to associate the terminal with
    the mailbox, thus allowing the /brdcstmbx command to be used ?
    
    	Once this HAS been set up, I expect all broadcast messages that
    are normally sent to my terminal to be sent to the mailbox instead.
    
    	Am I on the right track ? Why not!!!
    
    
    
    					Thanx,
    						Jamie.
T.RTitleUserPersonal
Name
DateLines
659.1Here's howMDVAX3::COARTue Jan 12 1988 12:5631
    No, you do not have to create the mailbox first.  All the /BRDCSTMBX
    setting does is enable the reception of broadcast messages by a
    mailbox associated with the terminal.
    
    That is, if you associate a mailbox with the terminal (e.g., using
    LIB$ASN_WTH_MBX), it will receive broadcast messages if the terminal
    is set /BRDCSTMBX, and won't if it isn't.  So set your terminal
    that way all the time; there's no harm to it.
    
    Just because a mailbox has been set up doesn't mean the messages
    will go there instead of the terminal.  Actually, the mailbox will
    get *copies* of the messages.  So the real best solution for handling
    your own messages is to
    
    	save current state of /BRDCSTMBX
    	SET TERMINAL /BRDCSTMBX
    	run program that
    		calls LIB$ASN_WTH_MBX
    		saves the current state of /BROADCAST
    		calls $QIO and sets the terminal /NOBROADCAST, *OR*
    		calls LIB$SPAWN ('SET TERMINAL /NOBROADCAST')
    		does its thing
    		restores state of /BROADCAST
    	SET TERMINAL /[no]BRDCSTMBX (whatever you saved in step 1)
    
    Of course, you could combine the setting and resetting of (/NOBROADCAST
    /BRDCSTMBX) into two QIO operations in your program, which would
    be the cleanest way because you wouldn't need a jacket procedure.
    I recommend resetting the terminal state as part of an exit handler.
    
    #ken	:-)}
659.2Thanks. Is this in TFM?ZFC::DERAMOFrom the keyboard of Daniel V. D'EramoThu Jan 28 1988 20:1312
    Re .-1:
    
    Thanks.  I wanted to know how to do this, too.  Unfortunately, I
    looked through VMSNOTES before thinking to try here, and here it
    is already answered!  My question now, is
    
                      How did you know that?
    
    I found nothing in the io manual in the mailbox section, and
    nothing in the on-line help for SET TERMINAL/BRDCSTMBX.
    
    Dan
659.3That's the way it wasMDVAX3::COARFri Jan 29 1988 18:586
    Try looking in the I/O Abuser's Guide in the terminal section, under
    the TT$M_BROADCAST and TT2$M_BRDCSTMBX terminal characteristics.
    (This is just a guess - I don't remember where/how I found out to
    begin with!)
    
    #ken	:-)}