GETALIAS
Obtains the current definition of a transport alias
or queue alias that is set by the SETALIAS function in the information
repository.
Supports: |
MQSeries, MQSeries C, MSMQ, Rendezvous, Rendezvous-CM |
Syntax
CALL GETALIAS(type, name, storage, rc, transport , queue>);
Required Arguments
- type
-
Character, input
Specifies the type
of alias. The following types are valid:
- name
-
Character, input
Identifies the transport
alias or queue alias that is set by the SETALIAS function.
- storage
-
Character, input
Specifies the location
for the alias 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.
- transport
-
Character, output
Returns the transport
name.
- queue
-
Character, output
Example
The following example
obtains a queue alias in the SAS registry:
length msg $ 200;
length rc 8;
length transport queue $ 80;
rc=0;
transport='';
queue='';
call getalias('QUEUE', 'MYQUEUE', 'REGISTRY',
rc, transport, queue);
if rc ^= 0 then do;
put 'GETALIAS: failed';
msg = sysmsg();
put msg;
end;
else do;
put 'GETALIAS: succeeded';
put 'Transport = ' transport;
put 'Queue = ' queue;
end;