MSMQ Call Routines |
Syntax | |
Arguments | |
Example |
Syntax |
CALL MSMQPATHTOFORMAT(pathName, qid, rc); |
Character, input
Represents the queue's pathname or actual format name of the queue, if known. If an MSMQ pathname is used to represent the queue, then it is converted to an MSMQ format name. Possible pathName representations are as follows:
Public queue: machineName\QueueName
Public queue's journal: machineName\QueueName;Journal
Private queue: machineName\PRIVATE$\QueueName
Private queue's journal: machineName\PRIVATE$\QueueName;Journal
Machine journal queue: machineName\JOURNAL
Machine deadletter queue: machineName\DEADLETTER
Machine transaction deadletter queue: machineName\DEADXACT
Note: machineName can be substituted with '.' to designate the local machine. If the actual format name of the queue is known, then this call can be used to transform it into the expected unicode string.
Possible format name representations are as follows:
Public queue: public=QueueGUID
Public queue's journal: public=QueueGUID;JOURNAL
Private queue: private=machineGUID\QueueNumber
Private queue's journal: private=machineGUID\QueueNumber;JOURNAL
Direct public queue: direct=AddressSpec\QueueName
Direct private queue: direct=AddressSpec\PRIVATE$\QueueName
where AddressSpec is of the form protocol:address (For example, tcp:10.26.1.177)
Machine journal queue: machine=machineGUID;JOURNAL
Machine deadletter queue: machine=machineGUID;DEADLETTER
Machine transaction deadletter queue: machine=machineGUID;DEADXACT
Foreign queue: connector=ForeignCNGUID
Foreign transaction queue: connector=ForeignCNGUID:XACTONLY
Numeric, output
Returns the queue identifier that represents the format name of the queue.
Numeric, output
Provides the return code from the CALL routine. If an error occurs, then the return code is nonzero. A return code of -1 reflects a SAS internal error. Otherwise, it represents an MSMQ error code. You can use the SAS function SYSMSG() to obtain a textual description of the return code.
Example |
This example obtains the format name of a queue from the pathname.
length msg $ 200; qid=0; rc=0; CALL MSMQPATHTOFORMAT("pcpad\testq", qid, rc); if rc ^= 0 then do; put 'MSMQPathToFormat: failed'; msg = sysmsg(); put msg; end; else put 'MSMQPathToFormat: succeeded';
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.