MSMQMAP
Defines a data map that can be subsequently used
on an MSMQSETPARMS or MSMQGETPARMS call.
Syntax
CALL MSMQMAP(hMap, rc, desc1 ,desc2, desc3, ...>);
Required Arguments
- hMap
-
Numeric, output
Returns the SAS internally
generated map descriptor handle.
- 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() to obtain a textual
description of the return code.
- descs
-
Character, input
Specifies descriptor
parameters that are used to describe the different data types in a
map. Each description (desc1, desc2, ...) defines the data type, an
offset from the beginning of the message, and the length of the data.
A descriptor has the following format:
TYPE<,OFFSET,LENGTH>
where:
- TYPE is one of the following:
-
-
-
-
-
DOUBLE (Floating point double)
- OFFSET
-
Specifies the offset
from the beginning of the message. This property is optional, so by
default the data is not aligned (data starts at next available position
in message).
- LENGTH
-
Specifies 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 because length
is implicitly defined.
Note:Type coercion is performed transparently when you put
SAS variables into an MSMQ message (MSMQSETPARMS) and also when you
get SAS variables from an MSMQ message (MSMQGETPARMS). That is, if
the data that you are sending or receiving is a different type than
the SAS variable itself, then the data is coerced into the appropriate
data type.
Example: 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, and strings will always be 200 characters in length (blank
padded).
hMap=0;
rc=0;
desc1="SHORT";
desc2="LONG";
desc3="DOUBLE";
desc4="CHAR,,200"
CALL MSMQMAP(hMap, rc, desc1, desc2, desc3,
desc4);