Override Message File (OVRMSGF)
Where allowed to run: All environments (*ALL)
Threadsafe: ConditionalParameters
Examples
Error messagesThe Override with Message File (OVRMSGF) command overrides a message file used in a program. The overriding message file is used (specified in the TOMSGF parameter) 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 Files and file systems topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter, the Application Display Programming book, SC41-5715, and the Basic Printing information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Using this command does not cause a file to be overridden immediately. Information provided on this command is stored until the file is used, at which time the file is overridden.
Top
Parameters
Keyword Description Choices Notes MSGF Message file being overridden Name Required, Positional 1 TOMSGF Overriding to message file Qualified object name Required, Positional 2 Qualifier 1: Overriding to message file Name Qualifier 2: Library Name, *LIBL, *CURLIB SECURE Secure from other overrides *NO, *YES Optional
Top
Message file being overridden (MSGF)
Specifies the message file being used by the program to which this override command is applied.
This is a required parameter.
- name
- Specify the name of the message file.
Top
Overriding to message file (TOMSGF)
Specifies the message file that is used instead of the message file specified in the Message file being overridden (MSGF) parameter; or, if the names are the same, specifies that the value specified in the Secure from other overrides (SECURE) parameter is used for the message file.
This is a required parameter.
Qualifier 1: Overriding to message file
- name
- Specify the name of the message file that is used instead of of the overridden message file.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched until the first match is found.
- *CURLIB
- The current library for the job is used to locate the message file. If no library is specified as the current library for the job, QGPL is used.
- name
- Specify the library where the message file is located.
Top
Secure from other overrides (SECURE)
Specifies whether this file is secured from the effects of message file override commands used in earlier calls. If this parameter is not specified, processing occurs as if *NO had been specified.
- *NO
- This message file is not protected from other file overrides. Its values can be overridden by the effects of any message file overrides used in earlier calls.
- *YES
- This message file is protected from the effects of any message file overrides used in earlier calls.
Top
Examples
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.
Top
Error messages
*ESCAPE Messages
- CPF180C
- Function &1 not allowed.
Top