Previous Page | Next Page

Common Messaging Interface Call Routines

INIT



Initializes a particular transport. You must use the TERM CALL routine to terminate the transport after you have completed a session.
Transports supported: MQSeries, MQSeries-C, MSMQ, Rendezvous, Rendezvous-CM

Syntax
Arguments
Details
Example

Syntax

CALL INIT(tid, tname, rc);

Arguments

tid

Numeric, output

Returns the transport handle that is used to open a queue or to begin transaction processing.

tname

Character, input

Specifies the name of the transport that is initialized. The following transport names are valid:

  • MQSERIES (trantab=SAS_trantab_override)

  • MQSeries-C (trantab=SAS_trantab_override)

  • MSMQ

  • RENDEZVOUS

  • RENDEZVOUS-CM

  • alias that is defined in the information repository

Note:    With the MQSeries transport, if you use SAS to perform the conversion instead of using an MQSeries conversion exit, then you can specify which TRANTAB to use for converting the application data.  [cautionend]

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.


Details

The following transports are valid: MQSeries (MQSeries Base/Server), MQSeries-C (MQSeries Client), MSMQ (Microsoft Message Queue), RENDEZVOUS (TIBCO TIB/Rendezvous), and RENDEZVOUS-CM (TIBCO TIB/Rendezvous Certified Message Delivery). In addition, you can use a transport alias name that is defined in the information repository to indirectly specify one of the transports.


Example

The following example initializes an MQSeries Base/Server transport:

length msg $ 200;
length tid rc 8;
tid=0;
rc=0;
call init(tid, 'MQSERIES', rc);
if rc ^= 0 then do;
  put 'INIT: failed';
  msg = sysmsg();
  put msg;
end;
else put 'INIT: succeeded';

Previous Page | Next Page | Top of Page