Chapter Contents |
Previous |
Next |
_getfield |
Syntax | |
Example |
Syntax |
CALL
SEND(queueInst, '_getfield', status, rc,
parm1 <, parm2...parmn>); |
Where... | Is type... | And represents... |
---|---|---|
status | N | status of parameter receipt |
rc | N | return code |
parm1...parmn | C or N | parameters in which to receive the message; consists of 1 or more numeric or character variables |
When a message is surfaced by a query, it needs to be received into SCL parameters. The _getfield method behaves like the _recv method in that it receives the message into SCL parameters. The two methods differ in that _recv requires that you receive the entire message at one time, while _getfield allows each parameter to be received separately. The _getfield method supports the receipt of numeric and character parameters, but it does not support the receipt of SCL lists. Use _getlist to receive SCL lists one at a time.
The status parameter has a value of 1 if this is the last parameter, indicating there are no additional parameters to retrieve. Otherwise, it has the value of 0.
If an error or warning condition is encountered during the receive, a non-zero return code is returned in the rc parameter. Use SYSMSG() to determine the exact error message.
Example |
This example receives one parameter, then two parameters, then the last one.
name1 = ''; name2 = ''; name3 = ''; name4 = ''; call send(queueInst, '_getfield', status, rc, name1); if (status ne 1) and (rc eq 0) then call send(queueInst, '_getfield', status, rc, name2, name3); if (status ne 1) and (rc eq 0) then call send(queueInst, '_getfield', status, rc, name4); /****************************************/ /* status should be set to 1 if this is */ /* the last parameter to be received */ /****************************************/ if (status eq 1) and (rc eq 0) then /* all parameters have been received */ /* and can be used in processing */
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.