ASSOCIATE MESSAGES / MSGS Statement

Read syntax diagramSkip visual syntax diagram ASSOCiate MESSagesMSGS1 COMPonent compid REPlaceFollowingPrecedingDELayNODELay EPName name
Notes:
  • 1 You can specify the following operands in any order, as long as EPNAME is the last operand specified.

Purpose

Use the ASSOCIATE MESSAGES / MSGS statement to assign an external symbol to a local message repository and to give CP information about how to select the messages in that repository during initialization.

You can also assign external symbols to local message repositories after initialization using the ASSOCIATE MESSAGES or MSGS commands. For more information, see ASSOCIATE MESSAGES / MSGS .

How to Specify

Include as many statements as needed; they are optional. You can place ASSOCIATE MESSAGES or MSGS statements anywhere in the system configuration file.

If you specify more than one statement with the same component name, CP keeps a cumulative list of operations. For example, if you have one statement indicating that you want to replace the list of entry point names and a later statement indicating that you want to add an entry point to the end of the list, CP replaces the list and adds to the end. The second statement does not overrule the first statement.

Operands

COMPonent compid
tells CP the component identifier to use when issuing one of the messages in the local message repository. The variable compid is a 1-character to three-character alphanumeric string. For example, the component ID for the system message repository (z/VM®) is HCP, which is, by default, the last message repository in the search list. For more information, see Usage Note 1.
REPlace
tells CP to replace the current list of entry point names and external symbols that are already associated with this local message repository with the list specified after the EPNAME operand.
Note: The order that you specify the entry points and external symbols is the order in which CP will call them.
Following
tells CP to add the specified entry point names or external symbols to the end of the list of existing entry point names and external symbols that are already associated with the specified local message repository.
Note: The order that you specify the entry points and external symbols is the order in which CP will call them.
Preceding
tells CP to add the specified entry point names or external symbols to the beginning of the list of existing entry point names and external symbols that are already associated with the specified local message repository.
Note: The order that you specify the entry points and external symbols is the order in which CP will call them.
DELay
tells CP to process this ASSOCIATE statement after all of the CP_ACCESS statements have been processed and after all of the delayed CPXLOAD statements have been processed. If omitted, DELAY is the default.
NODELay
tells CP to process this ASSOCIATE statement immediately.
EPName name
is the name (or names) of the entry point or external symbol that points to the data in the system execution space where the local message repository can be found. Each name must be a 1-character to 8-character string. The first character must be alphabetic or one of the following special characters: dollar sign ($), number sign (#), underscore (_), or at sign (@). The rest of the string can be alphanumeric characters, the four special characters ($, #, _, and @), or any combination thereof.
Note: The order that you specify the entry points and external symbols is the order in which CP will call them.

Usage Notes

  1. HCP is the standard component ID for z/VM messages. If you do not specify any ASSOCIATE MESSAGES or MSGS statements (or commands) for an entry point, HCPMES is, by default, the only message repository in the search list for that entry point.

    If you do assign one or more local message repositories to an entry point, those repositories are added to the search list in the order that you specify (using the REPLACE, FOLLOWING, or PRECEDING operands) and, by default, HCPMES is the last message repository in the search list.

    When the routines in that entry point issue a message, CP searches the first message repository in the search list. If CP finds the message in that repository, it issues the message and does not search any more repositories. If CP does not find the message, it continues searching through each repository until it finds the first occurrence of that message.

    Using ASSOCIATE MESSAGES or MSGS statements (or commands), you can assign local message repositories which override existing z/VM messages in the HCPMES repository. Or, you can specify HCP as the component ID and move the z/VM message repository to a place in the search list other than last place.

  2. Before CP can begin using your message repository, you must:
    1. Generate your messages using the CMS GENMSG command. For more information, see CMS GENMSG.
    2. Load the message repository file by using the CPXLOAD statement or command. For more information, see CPXLOAD Statement and CPXLOAD.
  3. If CP cannot find the entry point you specified for EPNAME when the message is being displayed, CP displays message substitution data, if any.
  4. To display information about the local message repositories available on your system, use the QUERY CPLANGLIST command and specify the ASSOCIATED operand. For more information, see QUERY CPLANGLIST.
  5. To remove the message repository file from the system execution space:
    1. Use the DISASSOCIATE command to revoke the external symbol assignment made with the ASSOCIATE MESSAGES or MSGS statement (or command.)
    2. Use the CPXUNLOAD command to unload the repository.

    For more information, see DISASSOCIATE and CPXUNLOAD.

  6. To have CP use the message repositories associated with a specific component, you must specify that component ID on the COMPID keyword of the HCPCONSL macroinstruction. For more information, see z/VM: CP Exit Customization

Examples

  1. To have CP assign an uppercase English message repository containing messages starting with OUR to entry point OURMESS1, use the following:
    Associate Messages component our,          /* Set it up so we can use */
                       preceding,              /* messages we wrote.      */
                       epname    ourmess1