Chapter Contents |
Previous |
Next |
_send |
Syntax | |
Example |
Syntax |
CALL SEND(cnctionInst, '_send', msgtype, header,
attachlist, rc <, parm1,...,parmn>); |
Where... | Is type... | And represents... |
---|---|---|
msgtype | N | user-specified message type |
header | L | delivery header list (or 0 if none) |
attachlist | L | attachment list (or 0 if none) |
rc | N | return code |
parm1...parmn | N or C | message to send, which consists of 0 or more numerics or characters in any order |
The _send method allows a message to be sent between two bound session instances. A message can consist of numerics and/or characters. SCL lists are not supported by _send; use _sendlist to send SCL lists.
The msgtype parameter is set by the user when the message is sent and will be surfaced on the receiving side upon return from the query. When surfaced by the query, on the receiving side, the message type can be used to determine how many and what type of parameters should be used in receiving the actual message using the _recv method.
The delivery header parameter is an SCL list that represents delivery information that is to be included. This information is surfaced on the query so it may be viewed by the receiver. If there is no information to include, header may be set to 0. Otherwise, header should be a valid SCL list, which consists of supported named items that are used to relay delivery information.
The attachlist parameter is an SCL list that represents a list of attachments to be sent with the message. If there are no attachments to send, a 0 should be specified. Otherwise, a valid attachment list should be passed in. This attachment list will be surfaced by the query on the receiving side. The receiving side then has the flexibility to decide which (if any) attachments to receive. See Sending Attachments for further details about the specific syntax for attachlist.
If an error or warning condition is encountered during the send, a non-zero return code is returned in the rc parameter. The return codes listed are a defined set of warning and error conditions that can be checked by using the SYSRC macro, which is provided in the autocall library that is supplied by SAS Institute.
If the rc is not one of the parameters that are defined below, use SYSMSG() to determine the exact error message.
call send(obj, "_acceptAttachment", 0, rc, "COMPLETE");
The parm1...parmn parameters are the 0 to n numeric and/or character values that are sent. Any number of parameters can be sent in any order.
Example |
This example invokes the _send method on the Cnction instance to send 5 parameters with no attachments.
name = "John Doe" age = 35; company = "SAS"; code = 13484; type = 472; msgtype = 11; header = 0; attachlist = 0; call send(cnctionInst, '_send', msgtype, header, attachlist, rc, name, age, company, code, type);
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.