Chapter Contents

Previous

Next
_getlist

_getlist



Receive one or more SCL lists at a time.


Syntax
Example

Syntax

CALL SEND(queueInst, '_getlist', status, rc,
list1 <, list2,...,listn>);

Where... Is type... And represents...
status N status of parameter receipt
rc N return code
list1...listn L one or more SCL lists to receive

When a message is surfaced by a query, it needs to be received into SCL parameters. The _getlist method behaves like the _recvlist method in that it receives the message into SCL list parameters. The two methods differ in that _recvlist requires that you receive the entire message at one time. _getlist allows each list to be received separately. The _getlist method supports the receipt of SCL lists _getfield should be used to receive non-SCL list parameters (that is numeric and character parameters).

The status parameter has a value of 1 if this is the last list, indicating there are no additional lists 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 SCL list, then two lists, then the last one.

list1 = makelist();
list2 = makelist();
list3 = makelist();
list4 = makelist();
call send(queueInst, '_getlist', status, rc, list1);

if (status ne 1) and (rc eq 0) then
   call send(queueInst, '_getlist', 
             status, rc, list2, list3);

if (status ne 1) and (rc eq 0) then
   call send(queueInst, '_getlist', 
             status, rc, list4);

   /****************************************/
   /* status should be set to 1 if this is */
   /* the last list to be received         */
   /****************************************/

if (status eq 1) and (rc eq 0) then
   /* all lists 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.