Article 166973 of comp.os.vms: Mailboxes are great for communicating with one process at a time, or for collecting input from a bunch of processes if they can stamp their identification inside the records they write, or if you don't care which process wrote which record, but mailboxes can be a pain when you have to deal with a bunch of (sub)processes all writing records to a single process AND you care who writes what. In that case, you generally need one mailbox per line of communication, and often, many, many mailboxes. Wouldn't it be nice if there was a special "fan in" mailbox? Every time it was read the result would be both a record AND the PID of the process that wrote it. (It might also be useful to let a process write to this type of mailbox and set the "PID" it wants to be seen.) Something like this simple pseudocode: status = create_fanin_mailbox(fanin,size of buffer,protection,AST,efn...) queue read of fanin using AST routine spawn(input<-command1, output->fanin,...) spawn(input<-command2, output->fanin,...) spawn(input<-command3, output->fanin,...) spawn(input<-command4, output->fanin,...) etc. The AST routine would do something like this: check the PID returned process the record as appropriate for that PID queue another read to the same mailbox, same AST routine The conjugate "fan out" mailbox could take several different forms. One I like is a set of output queues for N processes at once, where the fan out mailbox holds one or more records for each process specified, like this: status = create_fanout_mailbox(fanout,size of buffer,protection,AST,efn...) write record to PID (or PID list) through fanout This would be used like this: status = create_fanin_mailbox(fanin,size of buffer,protection,AST,efn...) status = create_fanout_mailbox(fanout,size of buffer,protection,AST,efn...) queue read of fanin using AST routine spawn(slave process, input<-fanout, output->fanin,...) spawn(slave process, input<-fanout, output->fanin,...) write record1 to PID1 through fanout write record2 to PID2 through fanout write "reset" to (PID1,PID2) through fanout In other words, the slave processes would be controlled strictly through writes to the single fan out mailbox, and their responses would come back in from the single fan in mailboxes. The slave processess wouldn't need to do anything special to be controlled this way, they would just read from sys$input and write to sys$output. Just a thought, David Mathog mathog@seqaxp.bio.caltech.edu Manager, sequence analysis facility, biology division, Caltech