MPE/iX Intrinsics Reference Manual (32650-90875)
600 Chapter10
Command Definitions (QUIT-ZSIZE)
SENDMAIL
SENDMAIL
NM and CM callable.
Sends mail to another process. Process handling (PH) capability is required.
Syntax
U16 I16V I16V UDS U16V
mailstatus
:=SENDMAIL(
pin,length,location,waitflag
);
Functional Return
mailstatus
16-bit unsigned integer (assigned functional return)
Returns one of the following values:
Value Meaning
0 Mail transmitted successfully and mailbox contained no
previous mail.
1 Mail was transmitted successfully and mailbox contained
mail sent previously that was overwritten by the new
mail, or contained previous incoming/outgoing mail that
was cleared.
2 Mail not transmitted successfully; mailbox contained
incoming mail to be collected by the sending process
(regardless of the
waitflag
setting).
3 Error occurred; an illegal
pin
parameter wasspecified or a
bounds check failed.
4 Illegal wait request; produces a deadlock.
5 Request denied;
length
exceeded the maximum mailbox
size allowed by the system.
6 Request denied; storage resources for the mail data
segment were not available.
Parameters
pin
16-bit signed integer by value (required)
The process to receive the mail. If you specify a child process,
pin
is the
process identification number (PIN) of that process. If a parent process is
specified,
pin
is zero.
length
16-bit signed integer by value (required)
The length of the message, in half words, transmitted from the stack of the
sending process. If 0 is specified, the mailbox is emptied of any incoming or