Home
Rules for using MQSC commands
You should observe the following rules when using MQSC commands:
- 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.
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 quoted strings).
- 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 other than:
- Period (.)
- Forward slash (/)
- Underscore (_)
- Percent sign (%)
must be enclosed in single quotation marks, unless they are:
- Issued from the WebSphere MQ for z/OS operations and control panels
- Generic values ending with an asterisk (on i5/OS these must be enclosed in single quotation marks)
- A single asterisk (for example, TRACE(*)) (on i5/OS these must be enclosed in single quotation marks)
- A range specification containing a colon (for example, CLASS(01:03))
If the string itself contains a quotation mark, the quotation mark is represented by two single quotation marks. Lowercase characters not contained within quotation marks are folded to uppercase.
- On platforms other than z/OS, a string containing no characters (that is, two single quotation marks with no space in between) is interpreted as a quoted blank space, in other words, ('') is interpreted in the same way as (' '). On z/OS, if you want a quoted blank space, enter it as such (' '). A string containing no characters ('') is the same as entering (), the rules for which are explained below.
- A left parenthesis followed by a right parenthesis, with no significant information in between, for example
NAME ( )is not valid except where specifically noted.- 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.
There is no synonym for the DELETE parameter. This is to avoid accidental deletion of objects when using DEF, the synonym for DEFINE.
Parent topic:
Using MQSC commands
sc10240_
Home