MQMAP

Defines a data map that can be subsequently used on an MQSETPARMS or MQGETPARMS call.

Syntax

CALL MQMAP(hMap, rc, desc1 ,desc2, desc3, ...>);

Required Arguments

hMap
Numeric, output
Returns a Base SAS internal map descriptor handle. The handle generated will be used to reference the data map when setting or getting Base SAS variables in a message.
rc
Numeric, output
Provides the Base SAS return code from this function. If an error occurs, then the return code is nonzero. You can use the Base SAS function SYSMSG() to obtain a textual description of the return code.
descs
Character, input
Specifies a data map descriptor that defines the data type, data offset from the beginning of the message, and data length. A descriptor has the following format:
"TYPE<,OFFSET,LENGTH>"
TYPE can be one of the following values:
  • CHAR (character data)
  • SHORT (short integer)
  • LONG (long integer)
  • DOUBLE (double precision floating point)
OFFSET is the offset from beginning of the message. This property is optional so that by default data is not aligned (data starts at next available position in message).
LENGTH is the length of the data being represented. This property is optional in most cases. The only time length is required is when setting up to receive character data. Specifying length for numeric data is ignored since length is implicitly defined.
Note:Type coercion is performed transparently when you put Base SAS variables into a WebSphere MQ message (MQSETPARMS) and also when you get Base SAS variables from a WebSphere MQ message (MQGETPARMS). That is, if the data that you are sending or receiving is of a different type than the Base SAS variable itself, the data will be coerced into the appropriate data type.

Example

This example defines a map to use to send and receive a message with a short, a long, a double, and a character string. No alignment is specified for any data type. For the character string, a length of 250 is specified.
hMap=0;
rc=0;
desc1="SHORT";
desc2="LONG";
desc3="DOUBLE";
desc4="CHAR,,250";
CALL MQMAP(hMap, rc, desc1, desc2, desc3,
desc4);