GETMAP
Obtains the current definition of a map data descriptor
in the information repository.
Supports: |
MQSeries, MQSeries C, MSMQ, Rendezvous, Rendezvous-CM |
Syntax
CALL GETMAP(name, storage, rc, descriptor);
Required Arguments
- name
-
Character, input
Identifies the map
data descriptor that is defined by a previous SETMAP function call.
- 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, output
Returns a string that
describes the layout of the data. The format of the descriptor is
as follows:
"type,offset,length;type,offset,length;..."
where:
-
type is the type of data (SHORT,
LONG, DOUBLE, CHAR)
-
offset is the offset from the beginning
of the message which is the cursor location in the case of the PARSEMESSAGE
routine
-
length is the length of the data
which is valid only for CHAR data type
Example
The following example
obtains a map data descriptor definition in the SAS registry:
length msg $ 200;
length rc 8;
length descriptor $ 80;
rc=0;
descriptor='';
call getmap('MYMAP', 'REGISTRY', rc, descriptor);
if rc ^= 0 then do;
put 'GETMAP: failed';
msg = sysmsg();
put msg;
end;
else do;
put 'GETMAP: succeeded';
put 'descriptor = ' descriptor;
end;