OVRMSGF (Override with Message File)
OVRMSGF Command syntax diagram
Purpose
The Override with Message File (OVRMSGF) command overrides a message file used in a program. The overriding message file (specified in the TOMSGF parameter) is used whenever a message is sent or retrieved and the overridden message file is specified.
The overriding message file need not contain all the messages that the overridden file contains. When a message is received or retrieved and the message identifier cannot be found in the overriding message file, the overridden message file is searched for the identifier. Overriding message files can be overridden, resulting in a chain of overrides. This chain of overrides provides a list of message files that are searched when a message is received or retrieved. Up to 30 message file overrides can be specified in a program.
Restrictions
- In a multithreaded job, this command may only be issued from the initial thread.
- In a multithreaded job, this command will only affect message file references performed in the initial thread. Message file references performed in secondary threads will be unaffected.
More information on overriding files is in the File Management topic in the Information Center.
Required Parameters
- MSGF
- Specifies the name of the message file being used by the program to which this override command is applied.
- TOMSGF
- Specifies the qualified name of the message file that is used instead of the message file specified in the MSGF parameter or, if the names are the same, specifies that the SECURE parameter specified in the command is used for the message file.
The name of the message file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
message-file-name: Specify the name of the message file to use.
Optional Parameters
- SECURE
- Specifies whether this file is safe from the effects of previously called file override commands. If SECURE is not specified, processing occurs as if SECURE(*NO) is specified.
*NO: This file is not protected from the effects of other file overrides; its values can be overridden by the effects of previously called file override commands.
*YES: This file is protected from the effects of any file override commands previously called.
Example for OVRMSGF
OVRMSGF MSGF(WSUSRMSG) TOMSGF(ORDENTMSGD)This override command causes the defaults for messages stored in ORDENTMSGD to be used instead of defaults stored in WSUSRMSG (which contains messages designed for work station users). As a result of this command, the messages received by the order entry users are tailored to their own environment.
Error messages for OVRMSGF
*ESCAPE Messages
- CPF180C
- Function &1 not allowed.