Administration using MQSC commands on IBM i

Use this information to learn about MQSC commands, and how to use them to administer IBM MQ for IBM i.

IBM MQ script (MQSC) commands are written in human-readable form, that is, in EBCDIC text. You use MQSC commands to manage queue manager objects, including the queue manager itself, queues, process definitions, namelists, channels, client connection channels, listeners, services, topics, and authentication information objects.

You issue MQSC commands to a queue manager using the STRMQMMQSC IBM MQ CL command. This method is a batch method only, taking its input from a source physical file in the server library system. The default name for this source physical file is QMQSC. Attention: Do not use the QTEMP library as the source library to STRMQMMQSC, as the usage of the QTEMP library is limited. We must use another library as an input file to the command. IBM MQ for IBM i does not supply a source file called QMQSC. To process MQSC commands create the QMQSC source file in a library of our choice, by issuing the following command:
CRTSRCPF FILE(MYLIB/QMQSC) RCDLEN(240) TEXT('IBM MQ - MQSC Source')
MQSC source is held in members within this source file. To work with the members enter the following command:
WRKMBRPDM MYLIB/QMQSC
We can now add new members and maintain existing ones We can also enter MQSC commands interactively, by issuing RUNMQSC or:
  1. Typing in the queue manager name and pressing the Enter key to access the WRKMQM results panel.
  2. Selecting F23=More options on this panel.
  3. Selecting option 26 against an active queue manager on the panel shown in Figure 1.

To end such an MQSC session, type end. Figure 1 is an extract from an MQSC command file showing an MQSC command (DEFINE QLOCAL) with its attributes.

Figure 1. Extract from the MQSC command file, myprog.in
.
.
DEFINE QLOCAL(ORANGE.LOCAL.QUEUE) REPLACE +
DESCR(' ') +
PUT(ENABLED) +
DEFPRTY(0) +
DEFPSIST(NO) +
GET(ENABLED) +
MAXDEPTH(5000) +
MAXMSGL(1024) +
DEFSOPT(SHARED) +
NOHARDENBO +
USAGE(NORMAL) +
NOTRIGGER;
.
.

For portability among IBM MQ environments, limit the line length in MQSC command files to 72 characters. The plus sign indicates that the command is continued on the next line.

Object attributes specified in MQSC are shown in this section in uppercase (for example, RQMNAME), although they are not case-sensitive. Note:
  1. The format of an MQSC file does not depend on its location in the file system.
  2. MQSC attribute names are limited to eight characters.
  3. MQSC commands are available on other platforms, including z/OS .

For a description of each MQSC command and its syntax, see MQSC commands.

Parent topic: Alternative ways of administering IBM MQ for IBM i