  Programming with Event Flags and Channels? 
 The Question is:
 
I need some help on Mailboxes. Process A creates a read/write mailbox with I/O
 channel defined in variable chanA. Process B creates a read/write mailbox with
 I/O channel defined in variable chanB.
 
Process A does a
sys$qio(0, chanA,IO$_WRITEVBLK, ....
 
Process B issues a read
sys$qio(efn, chanB, IO$_READVBLK
 
what I don't understand is how Process B can read the stuff written by Process
 A as they both have different event flags and channle numbers !! My code works
 I just can't understand what is happening.
 
 
 The Answer is:
 
  Process event flags and process channels are process-specific
  constructs, and have no relation to the process event flags and
  the process channels used in other processes.
 
  An example of using mailboxes is available at:
 
http://www.openvms.compaq.com/freeware/srh_examples/mbxdemo.c
 
  The OpenVMS Wizard would recommend one reader process per
  mailbox, with zero or more processes writing to the mailbox.
  This approach completely avoids the "turn-around" problems
  that are involved with half-duplex communications via a
  single mailbox.
 
  Do not use event flag zero.  Allocate the required event flags
  using lib$get_ef or (if you are on a sufficiently recent OpenVMS
  version, you can use the "do not care" event flag EFN$C_ENF
  (defined in $EFNDEF/EFNDEF.H).  Read up on $qiow and $synch.
 
  Always explicitly synchronize I/O completion -- see topic (1661)
  for a list of some common programming errors and various
  programming suggestions.  Also please acquire and read the
  OpenVMS Programming Concepts manual -- the FAQ has a pointer
  to the on-line version of this manual.
 
