Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Merge Message File (MRGMSGF) command allows you to merge messages from one message file with those in another message file. Another message file may be specified to hold the messages that are replaced during the merging process. None of the message files specified are deleted by this command.
Before the command is processed, messages can be in the from-message file (FROMMSGF), in the to-message file (TOMSGF), or in both files, but not in the replaced-message file (RPLMSGF). The three possibilities result in the following when the MRGMSGF command is processed:
Restrictions: You must have use (*USE) authority for the from-message file (FROMMSGF parameter); use (*USE), add (*ADD), and delete (*DLT) authorities for the to-message file (TOMSGF parameter); and *USE and *ADD authorities for the replace-message file (RPLMSGF parameter).
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FROMMSGF | From message file | Qualified object name | Required, Positional 1 |
Qualifier 1: From message file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
TOMSGF | To message file | Qualified object name | Required, Positional 2 |
Qualifier 1: To message file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
RPLMSGF | Replaced message file | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Replaced message file | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
SELECT | Message IDs to select | Single values: *ALL Other values (up to 50 repetitions): Name |
Optional |
OMIT | Message IDs to omit | Single values: *NONE Other values (up to 50 repetitions): Name |
Optional |
Top |
Specifies the message file from which the messages are to be merged.
This is a required parameter.
Qualifier 1: From message file
Qualifier 2: Library
Top |
Specifies the message file into which the messages are to be merged.
This is a required parameter.
Qualifier 1: To message file
Qualifier 2: Library
Top |
Specifies the message file that will receive overlaid messages from the message file specified for the To message file (TOMSGF) parameter.
Single values
Qualifier 1: Replaced message file
Qualifier 2: Library
Top |
Specifies selective message IDs to merge from the message file specified for the From message file (FROMMSGF) parameter into the message file specified for the To message file (TOMSGF) parameter. Only the selected messages will be merged.
Single values
Other values
Top |
Specifies selective message IDs to not be merged from the message file specified for the From message file (FROMMSGF) parameter into the message file specified for the To message file (TOMSGF) parameter. All message IDs in the from-message file not included in this list are merged.
Single values
Other values
Top |
Example 1: Merging Two Files
MRGMSGF FROMMSGF(A) TOMSGF(B)
Table 1. Contents of the Files Before the Merge Message File A Message File B ----------------- ----------------- ABC1234 'text A4' ABC1233 'text B3' ABC1236 'text A6' ABC1234 'text B4' ABC1237 'text A7' ABC1235 'text B5' ABC1238 'text A8' ABC1236 'text B6'
Below are the two message files after the MRGMSGF command is processed. Notice that messages ABC1234 and ABC1236 are in both files. When the merge occurs, the message text from file A (text A4 and A6 respectively) replaces the message text in file B (text B4 and B6 respectively).
Table 2. Contents of the Files After the Merge Message File A Message File B ----------------- ----------------- ABC1234 'text A4' ABC1233 'text B3' ABC1236 'text A6' ABC1234 'text A4' ABC1237 'text A7' ABC1235 'text B5' ABC1238 'text A8' ABC1236 'text A6' ABC1237 'text A7' ABC1238 'text A8'
Example 2: Merging Two Files with Replace File Option
In the example below, messages that are replaced in the to-file are saved to a separate file before being replaced.
MRGMSGF FROMMSGF(A) TOMSGF(B) RPLMSGF(C)
Table 3. Contents of the Files Before the Merge Message File A Message File B ----------------- ----------------- ABC1234 'text A4' ABC1233 'text B3' ABC1236 'text A6' ABC1234 'text B4' ABC1237 'text A7' ABC1235 'text B5' ABC1238 'text A8' ABC1236 'text B6'
Below are the two message files after the MRGMSGF command is processed. Notice that messages ABC1234 and ABC1236 are in both files. When the merge occurs, the text from these two messages is first moved to file C (text B4 and B6 respectively). Then, message text from file A (text A4 and A6 respectively) replaces the message text in file B (text B4 and B6 respectively).
Table 4. Contents of the Files After the Merge Message File A Message File B Message File C ----------------- ----------------- ----------------- ABC1234 'text A4' ABC1233 'text B3' ABC1234 'text B4' ABC1236 'text A6' ABC1234 'text A4' ABC1236 'text B6' ABC1237 'text A7' ABC1235 'text B5' ABC1238 'text A8' ABC1236 'text A6' ABC1237 'text A7' ABC1238 'text A8'
Top |
*ESCAPE Messages
Top |