Function
The //MERGE-MSG-FILES statement allows the total contents of two or more message files to be merged into a new message file which should be empty or not cataloged. The total contents means that all messages, including the documentation lines, are included in the merge run. The LANGUAGES operand can be used to restrict the merge run to messages in specific languages.
Special points relating to a merge run
If the message files contain messages with the same message codes, MSGMAKER recognizes this. The following message is displayed:
% MSMQI00 IDENTICAL OBJECTS IN FILES 1='filename 1' AND 2='filename 2'.
PRIORITY? REPLY (1;2;T=TERMINATE).
In this query, the user decides which message file should be given priority in terms of the message code. The same query is output each time two files are found with the same code; indeed, the query is also output when messages from different files are stored with the same message code but in different languages.
The identical messages in the non-prioritized file are not included in the target file.
In batch jobs and procedures, the message file named first in the FILE-NAMES operand is given priority if message codes are found to coincide. A message is output to inform the user when this happens.
The same check procedure is applied to identical documentation lines and decided on the basis of the specified priority.
No screen is available at present which corresponds to the //MERGE-MSG-FILES statement. The statement can be entered in the command line of the mask and started with DUE or F2.
Format
MERGE-MSG-FILES |
FILE-NAMES = list-poss(2000): *CURRENT / <filename 1..80 with-wild> / <partial-filename 2..79 with-wild> ,LANGUAGES = *ALL / list-poss(8): <name 1..1> ,TO-FILE = *CURRENT / <filename 1..54> |
Operands
FILE-NAMES = list-poss(2000): *CURRENT / <filename 1..80 with-wild> /<partial-filename 2..79 with-wild>
Designates one or more message files which are to be merged. If only one name is specified, this amounts to the same as copying the file to the file specified by TO-FILE.
*CURRENT denotes the last file opened using the //OPEN-MSG-FILE statement is specified.
If a file is named more than once, MSGMAKER ignores all mentions of it except the first one.
LANGUAGES = *ALL / list-poss(8): <name 1..1>
Designates the languages in which the messages are stored.
LANGUAGES = *ALL
Die Meldungsdatei soll vollständig, d. h. alle Meldungen in allen Sprachen, für den Mischvorgang verwendet werden.
LANGUAGES = list-poss(8): <name 1..1>
Only the messages from the message file in the specified languages are to be used in the merge run.
TO-FILE = *CURRENT / <filename 1..54>
Output file in which the contents of the input files are merged. *CURRENT designates the last file opened in MSGMAKER.
The output file must be empty or not yet cataloged. The following rules apply to the file attributes:
The data type of the output file is based on the data type of the input file. If there is at least one input file of the standard type, the output file assumes this file type. Input files of the customer type also result in an output file of the customer type.If the output file is assigned the customer type with the //OPEN-MSG-FILE statement and there is at least one input file of the standard type, MSGMAKER displays the warning
MSMWJ01
:If there are several input files, the file attributes product name and product version of the output file are not defined.
If there is only one input file, its file attributes are transferred to the output file. In other words, the output file is the copy of the input file.
Example
//OPEN-MSG-FILE FILE-NAME=SYSMES.EKP.112, MODE=CREATE(TYPE=STANDARD, PRODUCT=BS2000(V200)) //MERGE-MSG-FILES FILE-NAMES=(SYSMES.INT*.200,SYSMES.COMP*.///, SYSMES.SPECIAL.123), TO-FILE=*CURRENT