SETMAP

Defines a map data descriptor in the information repository.
Supports: MQSeries, MQSeries C, MSMQ, Rendezvous, Rendezvous-CM

Syntax

CALL SETMAP(name, storage, rc, descriptor);

Required Arguments

name
Character, input
Identifies the map data descriptor that is assigned.
storage
Character, input
Specifies the location for the map definition. The REGISTRY location is valid.
rc
Numeric, output
Provides the return code from the CALL routine. If an error occurs, then the return code is nonzero. You can use the SAS function SYSMSG() in order to obtain a textual description of the return code.
descriptor
Character, input
Describes the layout of the data within a message body. This parameter is a string that contains the data type, the offset (optional), and (for character data) the length of each SAS variable. This data is presented in the order in which it is passed to a SENDMESSAGE call and returned from a RECEIVEMESSAGE call. The descriptor has the following format:
"type,offset,length;type,offset,length;..."
where:
  • type is the type of data (SHORT, LONG, DOUBLE, or CHAR).
  • offset is the offset from the beginning of the message, which is the cursor location in the case of the PARSEMESSAGE routine. This parameter is optional.
  • length is the length of the data, which is valid only for the CHAR data type.

Details

A map specifies the layout of the data within a message body. Maps can be used with the MQSeries, MQSeries C, MSMQ, Rendezvous, or Rendezvous-CM transport when sending and receiving data.

Example

The following example defines a map data descriptor in the SAS registry:
length msg $ 200;
length rc 8;
rc=0;
call setmap('MYMAP', 'REGISTRY', rc,
'SHORT;LONG,2;SHORT;DOUBLE,6;CHAR,,50');
if rc ^= 0 then do;
  put 'SETMAP: failed';
  msg = sysmsg();
  put msg;
end;
else put 'SETMAP: succeeded';