Command aliases

Adapter commands can be specified by using a command string on the command line or by creating a command file that contains adapter commands. The execution command syntax is:

-IM[ alias } card_num
-OM[ alias ] card_num

where -IM is the Input Source - Override execution command and -OM is the Output Target - Override execution command, alias is the adapter alias, and card_num is the number of the input or output card, respectively. The following table shows the adapter aliases and execution commands.

Adapter Alias As Input As Output
IBM® MQ (client) MQSC -IMMQSCcard_num -OMMQSCcard_num
IBM® MQ (server) MQS -IMMQScard_num -OMMQScard_num

When using an adapter alias with the execution command, the IBM® MQ adapter commands can be issued on the command line or in a command file. Use the adapter commands to specify adapter functions such as:

  • specifying a particular message identifier
  • allowing output data to be broken up into multiple messages
  • retrieving a logical message from a source queue with a correlation identifier

For example, to override the adapter commands defined in output card 1, the command string for the adapter in an IBM® MQ server environment might be:

-IMMQS1 '-QMN queuemgr -QN topqueue -T'

This sample execution command string specifies the queue manager named queuemgr and the queue named topqueue as the source for this card's data. The -T command dictates that a trace file be created to report adapter activity information, recording the events that occur while the adapter is retrieving this data.