[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

Calling sys$brkthru?

» close window

The Question is:

 
I'm trying to send a message to a single DECTerm
an DECWindows environment.
 
Using sys$brkthu(0, &msg, &user, BRK$C_USERNAME, ...);
works fine but sends to multiple windows.
 
sys$brkthru(0, &msg, &term, BRK$C_DEVICE,...);
does not work, though I've tried various different forms of "term"
as got from 'sho term' and 'sho log sys$output'
 
Any ideas? Thanks,
                  john
 
 


The Answer is :

 
  When posting questions, a concise, complete source code example, and
  the specific condition message(s) generated, can be quite useful to
  the OpenVMS Wizard.
 
  There are examples of sending messages to specific terminals available
  from various sources.
 
  Be aware that any DCL process-permanent files (PPFs) will have a couple
  of "odd" characters at the front of the translation of the PPF logical
  name, this is the channel number.  (See PPF or similar in the OpenVMS
  Master Index for details.)
 
  Attached is an example program, derived from a program included on the
  OpenVMS Freeware V4.0 CD-ROM.  (Note that the program has been modified
  slightly for viewing on the web, the angle brackets on the include
  statements have been replaced by square brackets and will have to be
  altered back to permit compilation.)
 
/*
 * This program demonstrates the $BRKTHRUW system service; this
 * program sends a message to a hardcoded device name; this demo
 * uses the MAIL broadcast class with a five second timeout.
*/
 
#include [brkdef.h]
#include [descrip.h]
#include [ssdef.h]
#include [starlet.h]
#include [stsdef.h]
 
main()
    {
    unsigned long int carcon = 0x20;
    unsigned long int retstat;
    unsigned short int iosb[4];
 
    $DESCRIPTOR( trg, "FTA16:" );
    $DESCRIPTOR( msg, "This is a $BRKTHRU test" );
 
    /*
     *  And now we do what we came here for...  The $brkthru.
     */
    retstat = sys$brkthruw( 0, &msg,
	&trg, BRK$C_DEVICE, iosb, &carcon, 0, BRK$C_MAIL, &5, 0, 0 );
    if  (!$VMS_STATUS_SUCCESS( retstat ))
	return retstat;
    if  (!$VMS_STATUS_SUCCESS( iosb[0] ))
	return iosb[0];
 
    return SS$_NORMAL;
    }
 

answer written or last revised on ( 16-APR-1999 )

» close window