MSMQBEGINTRANS
Creates an internal MSMQ transaction object that
can be used to send messages to a queue or read messages from a queue.
Syntax
CALL MSMQBEGINTRANS(transObj, rc);
Required Arguments
- transObj
-
Numeric, output
Returns the transaction
object.
- rc
-
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: Example
This example creates
a transaction object.
length msg $ 200;
transobj=0;
rc=0;
CALL MSMQBEGINTRANS(transobj, rc);
if rc ^= 0 then do;
put 'MSMQBeginTrans: failed';
msg = sysmsg();
put msg;
end;
else put 'MSMQBeginTrans:
succeeded';