Using a mass template association

You use a mass template association to create or delete multiple event or history template associations in a group.

When using the mass association command, you specify:

  • the type of template (event or history)
  • an object type, such as ComMqsoftwareWebphereMQLocalQueue
  • a template name, such as queueDepthChanged
  • a topic instance path or regular expression to match multiple paths.
Before committing to an association, always run the n or -printOnly parameter first to test the program for correct operation.

Before you begin

 Know the names and types of the objects you wish to associate.

To use the mass association command

  1. Open a command prompt in the InstallDir.
  2. Enter the following:

    maketmpltassoc [-d] [-n] UserID [-p password] history | event template_object_type template_name [regex | instance name]* [-s|-v|-z]

    where the parameters are as described in the table below.

    The program validates the parameters and finds instances that match the topic path or regular expression. For each match, the tool checks for existing associations for that object. In the History Service an object can be associated with a template or a concrete rule, but not both.
  3. Restart the Monitor Console to see the changes.

    Parameters and short and long switches


    -?, --usage

    Print out the program usage

    -d, --delete

    Delete any templates matching the parameters.

    -n, --printOnly

    Only display the matches; don't create the associations.

    -p, --passworda password

    The password for the user id. The default behavior is to read the password from the console. Cannot be used with -s.


    Read stdin for password. Cannot be used with -p.

    -v, --version

    Print out the product version.

    history | event

    Enter the name of the template you want to associate. Use the word history or event or the letters h or e. This parameter is not case-sensitive. Any type that exists in the history template or event template tab of the Monitor Console is allowed in the maketmpltassoc tool.

    regexb | instance nameThe full instance name of an object or a Perl-compatible regular expression matching multiple topic paths to associate with the template. The services on Windows require that you provide the hostname (first object in an instance name) as all uppercase letters. For services on UNIX, uppercase is not required.


    The name of the template used to create the rules. This can be a substring of the template name as long as it is unique when expanded. Case-sensitive.


    The type of object the template should be applied to when creating rules. This can be a substring of the type name as long as it is unique when expanded. Case-sensitive.


    A valid, case-sensitive user ID.

    1. For the highest level of security, passwords are entered from the console by default. This can be time-consuming if you are processing a multiple line directive file because the password is requested for each command. This can be overridden with either '-p' or 'password' followed by the password on the command invocation line or '-s' which reads from stdin for the password, all of which are mutually exclusive.
    2. The regular expression is not bound to the beginning or end of the topic instance path name. Therefore, whatever is passed in as the regular expression acts as a regular expression sub-string match. If "e" is passed as the regular expression then every topic instance path that contains the letter 'e' is [dis]associated.
    3. template_name and template_object_type can be regular expression substrings of the actual values. If names contain spaces they must be quoted as illustrated in the examples in this section.
To break up associations into multiple hierarchal parts, you could use queue managers that start with A, then B, then C, and so on. Or you can break them down by store number, department, project name, and so on.
When you have large installations, naming standards can make a difference as to how easy or hard it is to manage. We recommend: 1compName_channelstatus type hierarchical naming standards with the possible inclusion of project, store or department names. When all your template names begin with 1compNameDept_ your event templates sort to the top of the event tab display for easy readability.


When creating or deleting associations:

  • If the object is already associated (creating) or not associated (deleting), the program notifies you and skips the object.
  • Otherwise, the program creates or deletes the object and reports on the success or failure of the process.
Was this page helpful? Yes No Submitting... Thank you