+

Search Tips | Advanced Search

Administration using MQSC commands

We can use MQSC commands to manage queue manager objects, including the queue manager itself, queues, process definitions, channels, client connection channels, listeners, services, namelists, clusters, and authentication information objects. MQSC commands are available on all platforms.


The way that we issue MQSC commands depends on the platform:

MQSC commands are detailed in the MQSC commands section.


Procedure

  • Each command starts with a primary parameter (a verb), and this is followed by a secondary parameter (a noun). This is then followed by the name or generic name of the object (in parentheses) if there is one, which there is on most commands. Following that, parameters can usually occur in any order; if a parameter has a corresponding value, the value must occur directly after the parameter to which it relates. Note: On z/OS, the secondary parameter does not have to be second.

  • Keywords, parentheses, and values can be separated by any number of blanks and commas. A comma shown in the syntax diagrams can always be replaced by one or more blanks. There must be at least one blank immediately preceding each parameter (after the primary parameter) except on z/OS .

  • Any number of blanks can occur at the beginning or end of the command, and between parameters, punctuation, and values. For example, the following command is valid:
    ALTER QLOCAL ('Account' )      TRIGDPTH ( 1)
    
    Blanks within a pair of quotation marks are significant.

  • Additional commas can appear anywhere where blanks are allowed and are treated as if they were blanks (unless, of course, they are inside strings enclosed by quotation marks).

  • Repeated parameters are not allowed. Repeating a parameter with its "NO" version, as in REPLACE NOREPLACE, is also not allowed.

  • Strings that contain blanks, lowercase characters or special characters must be enclosed in single quotation marks, unless one of the following things is true:

    • The special characters are one or more of the following characters:

      • Period (.)
      • Forward slash (/)
      • Underscore (_)
      • Percent sign (%)

    • The command is issued from the IBM MQ for z/OS operations and control panels.

    • The string is a generic value ending with an asterisk. (on IBM i these must be enclosed in single quotation marks)

    • The string is a single asterisk, for example, TRACE(*) (on IBM i these must be enclosed in single quotation marks)

    • The string is a range specification containing a colon, for example, CLASS(01:03)

    If the string itself contains a single quotation mark, the single quotation mark is represented by two single quotation marks. Lowercase characters not contained within quotation marks are folded to uppercase.

  • On Multiplatforms, a string containing no characters (that is, two single quotation marks with no space in between) is interpreted as a blank space enclosed in single quotation marks, that is, interpreted in the same way as (' '). The exception to this is if the attribute being used is one of the following attributes, when two single quotation marks with no space are interpreted as a zero-length string:

    • TOPICSTR
    • SUB
    • USERDATA
    • SELECTOR

  • On z/OS, if we want a blank space enclosed in single quotation marks, we must enter it as such (' '). A string containing no characters ('') is the same as entering ().

  • Any trailing blanks in string attributes that are based on MQCHARV types, such as SELECTOR, sub user data, are treated as significant, which means that 'abc ' does not equal 'abc'.

  • An opening parenthesis followed by a closing parenthesis, with no significant information in between, is not valid except where specifically noted. For example, the following string is not valid:
    NAME ( )
    

  • Keywords are not case sensitive: AltER, alter, and ALTER are all acceptable. Anything that is not contained within quotation marks is folded to uppercase.

  • Synonyms are defined for some parameters. For example, DEF is always a synonym for DEFINE, so DEF QLOCAL is valid. Synonyms are not, however, just minimum strings; DEFI is not a valid synonym for DEFINE. Note: There is no synonym for the DELETE parameter. This is to avoid accidental deletion of objects when using DEF, the synonym for DEFINE.

  • MQSC commands use certain special characters to have certain meanings.


Subtopics

Parent topic: Administer IBM MQ


Related information

Last updated: 2020-10-04