DEFINE NAMELIST (define a list of names)

Use the MQSC command DEFINE NAMELIST to define a list of names. This is most commonly a list of cluster names or queue names.

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

[z/OS]You can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which you can issue MQSC commands on z/OS®.

Synonym: DEF NL

Values shown above the main line in the railroad diagram are the defaults supplied with IBM® MQ, but your installation might have changed them. See Syntax diagrams.

DEFINE NAMELIST

Read syntax diagramSkip visual syntax diagram DEFINE NAMELIST ( name ) CMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)12QSGDISP(QMGR)QSGDISP(COPY)1QSGDISP(GROUP)12define attrsnamelist attrs
Define attrs
Read syntax diagramSkip visual syntax diagramLIKE(namelist-name)NOREPLACEREPLACE
Namelist attrs
Read syntax diagramSkip visual syntax diagramDESCR(' ')DESCR(string)NAMES(,name)NLTYPE(NONE)NLTYPE(QUEUE)NLTYPE(Q)NLTYPE(CLUSTER)NLTYPE(AUTHINFO)2
Notes:
  • 1 Valid only on z/OS when the queue manager is a member of a queue sharing group.
  • 2 Valid only on z/OS.

Usage notes

Successful completion of the command does not mean that the action completed. To check for true completion, see the DEFINE NAMELIST step in Checking that async commands for distributed networks have finished.

Parameter descriptions for DEFINE NAMELIST

(name)
Name of the list.

The name must not be the same as any other namelist name currently defined on this queue manager (unless REPLACE or ALTER is specified). See Rules for naming IBM MQ objects.

[z/OS]CMDSCOPE
This parameter applies to z/OS only and specifies how the command runs when the queue manager is a member of a queue sharing group.
CMDSCOPE must be blank, or the local queue manager, if QSGDISP is set to GROUP.
' '
The command runs on the queue manager on which it was entered.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

You can specify a queue manager name other than the queue manager on which it was entered, only if you are using a shared queue environment and if the command server is enabled.

*
The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect of specifying * is the same as entering the command on every queue manager in the queue sharing group.
DESCR(string)
Plain-text comment. It provides descriptive information about the namelist when an operator issues the DISPLAY NAMELIST command (see DISPLAY NAMELIST (display a list of names)).

It must contain only displayable characters. The maximum length is 64 characters. In a DBCS installation, it can contain DBCS characters (subject to a maximum length of 64 bytes).

Note: If characters are used that are not in the coded character set identifier (CCSID) for this queue manager, they might be translated incorrectly if the information is sent to another queue manager.
LIKE(namelist-name)
The name of a namelist, with parameters that are used to model this definition.

If this field is not completed and you do not complete the parameter fields related to the command, the values are taken from the default definition for namelists on this queue manager.

Not completing this parameter is equivalent to specifying:

LIKE(SYSTEM.DEFAULT.NAMELIST)

A default namelist definition is provided, but it can be altered by the installation to the default values required. See Rules for naming IBM MQ objects.

[z/OS]On z/OS, the queue manager searches page set zero for an object with the name you specify and a disposition of QMGR or COPY. The disposition of the LIKE object is not copied to the object you are defining.
Note:
  1. QSGDISP (GROUP) objects are not searched.
  2. LIKE is ignored if QSGDISP(COPY) is specified.
NAMES(name, ...)
List of names.

The names can be of any type, but must conform to the rules for naming IBM MQ objects, with a maximum length of 48 characters.

An empty list is valid: specify NAMES(). The maximum number of names in the list is 256.

[z/OS]NLTYPE
Indicates the type of names in the namelist.

This parameter is valid only on z/OS.

NONE
The names are of no particular type.
QUEUE or Q
A namelist that holds a list of queue names.
CLUSTER
A namelist that is associated with clustering, containing a list of the cluster names.
AUTHINFO
This namelist is associated with TLS and contains a list of authentication information object names.

Namelists used for clustering must have NLTYPE(CLUSTER) or NLTYPE(NONE).

Namelists used for TLS must have NLTYPE(AUTHINFO).

[z/OS]QSGDISP
This parameter applies to z/OS only.

Specifies the disposition of the object to which you are applying the command (that is, where it is defined and how it behaves).

Table 1. Object dispositions for QSGDISP options
QSGDISP DEFINE
COPY

The object is defined on the page set of the queue manager that executes the command. It uses the QSGDISP(GROUP) object of the same name as the LIKE object.

For example, if you issue the following command,

DEFINE NAMELIST(namelist_name)
REPLACE QSGDISP(COPY)
the queue manager searches the shared configuration repository for a NAMELIST definition called namelist_name. If a matching NAMELIST definition is found, the queue manager creates a local copy of this definition on the queue manager page set.

For local queues, messages are stored on the page sets of each queue manager and are available only through that queue manager.

GROUP

The object definition resides in the shared configuration repository. QSGDISP(GROUP) is allowed only if the queue manager is in a queue sharing group.

If the DEFINE for the QSGDISP(GROUP) object is successful, the DEFINE NAMELIST(namelist_name) REPLACE QSGDISP(COPY) command is generated and sent to all active queue managers in the queue sharing group to make or refresh local copies on page set zero.

The DEFINE for the group object takes effect regardless of whether the generated command with QSGDISP(COPY) fails.

PRIVATE Not permitted.
QMGR

The object is defined on the page set of the queue manager that executes the command.

REPLACE and NOREPLACE
Whether the existing definition (and on z/OS, with the same disposition) is to be replaced with this one. Any object with a different disposition is not changed.
REPLACE
The definition replaces any existing definition of the same name. If a definition does not exist, one is created.
NOREPLACE
The definition does not replace any existing definition of the same name.