By using the message identifiers that are stored in the command (*CMD) object when the command was created, prompt messages can be dynamically retrieved from the message file. This function enables a single command to have prompt messages in more than one national language.
To use dynamic prompt messages, you need to create a command definition object using the Create Command (CRTCMD) command, specify message identifiers for the PROMPT and CHOICE parameters in the *CMD object, and specify a message file for the first element of the prompt message file (PMTFILE) parameter and *DYNAMIC for the second element. By having a copy of the prompt message file in the national language that you need in the library list at prompt time, the same command can be prompted in any national languages.
The message ID specified for the PROMPT or CHOICE parameter on a CMD, PARM, QUAL, or ELEM command definition statement must be found in the prompt message file both when the command is being created and when the command is being prompted.
If an error in locating the message file occurs at the time the command is prompted, all prompt text is retrieved from the static copies of prompt messages stored in the *CMD object. If the message file is found, but an individual prompt text is not found in the message file, the static copy of the prompt text stored in the *CMD object is used for the message.