LANGMERG

Read syntax diagramSkip visual syntax diagram LANGMERG langid applid (CTLapplidlangid(CTLfilename)

Authorization

Saved Segment Administrator

Purpose

Use the LANGMERG command to combine all the language-related files for an application into one text file. You can then use the LANGGEN command to load this single text file into a physical saved segment as a language segment, or you can use the SEGGEN command to load this text file into a logical saved segment.

You should use the LANGMERG command for these purposes:
  • When you have changed something in a language file and you want to recombine all the updated language information for an application.
  • When you are building a language text file for an application.

Operands

langid
is the language ID of the language whose text file is being created. A language ID may be 1-5 characters in length and must be made up of only CMS file system characters.
applid
is the application ID of the application whose text file is being created. This must be three characters long.
CTL filename
specifies the file name of a control file that identifies the language files to be combined. The default control file name is applidlangid. The file type of the control file must be LANGMCTL. The file can reside either on a minidisk or in an SFS directory. The contents of the control file are described below.

Usage Notes

  1. The single text file created by LANGMERG has a file ID of applidNLS TXTlangid.
  2. When you want to use a different language file, you must either:
    • Edit the default LANGMERG control file.
    • Make your own control file and specify it as an option when you invoke LANGMERG.
  3. LANGMERG creates a map on file mode A that shows where language information is stored within a text file. The file ID of this map is applidlangid LANGMAP.
  4. The text files produced by GENCMD may be empty. LANGMERG detects this condition and notes it in the LANGMAP file. This general condition indicates no entries were produced for the file.

LANGMERG's Control File

You must create a LANGMERG control file to issue the LANGMERG command. LANGMERG's control file supplies information about the language and identifies the files to be loaded.

The LANGMERG control file may contain the following types of records:

  1. Comment:
    *comment

    Anything may follow the * on a comment record. The asterisk must be the first character on the record.

  2. A DISK record, which identifies the address of a disk associated with the language:
    DISK vdev

    For CMS, the DISK record identifies the HELP disk; other applications can use this record for different purposes.

  3. An ETMODE record, which identifies whether the language named is a double-byte character set (DBCS) language:
    ETMODE ON|OFF
    ETMODE should be ON if the language is a DBCS language. If this record is omitted in the control file, OFF is assumed.
  4. Records that identify the file IDs of language files in the language control block:
    keyword fn [ft fm] [(VMCTL cntrlfn[)]]
    keyword can be:
    MESSAGE
    for a system or user message repository
    PARSERS
    for system or user command syntax definition files
    SYNONYMS
    for a system or user national language synonym and translation file
    TRTABLES
    for translate tables
    USER
    for your installation's use

    You can specify the MESSAGE, PARSERS, SYNONYMS, and TRTABLES records only once in the control file.

    The fn variable is the file name (the file type and file mode are optional) of the language file where the information is to be read. The file names should be in this format:
    applidMEScc
    for a system message repository
    applidUMEcc
    for a user message repository
    applidSPAcc
    for system command syntax definition files
    applidUPAcc
    for user command syntax definition files
    applidSSYcc
    for a national language system synonym and translation file
    applidUSYcc
    for a national language user synonym and translation file
    applidTRTcc
    for translate tables
    applidUSEcc
    for your installation's use
    Note: You do not need to specify the country code (cc) on the file name if you omit the file type and you specify the VMCTL cntrlfn option.

    The VMCTL cntrlfn option specifies a control file LANGMERG should use to determine the file ID of the language file (object deck):

    • If you specify a file type on the language file record, LANGMERG uses the file ID as specified, regardless of whether you specify the VMCTL cntrlfn option in the LANGMCTL file.
    • If you do not specify a file type on the language file record, but you do specify the VMCTL cntrlfn option on either that record or a previous language file record in the LANGMCTL file:
      1. LANGMERG looks up the language identifier (langid) in the VMFNLS LANGLIST file. If VMFNLS LANGLIST is not found, message 2 (File VMFNLS LANGLIST * not found) return code 28 is issued.
      2. If the file name from the language file record in the LANGMCTL file is six or fewer characters long, LANGMERG appends the two-character country code for that language from VMFNLS LANGLIST to the end of the language file name; otherwise, the file name is used as is.
      3. LANGMERG calls VMFLDS to determine the object deck file type.
      4. If you do not specify a control file name after the VMCTL keyword in the LANGMCTL file, LANGMERG writes message 387 format 5 (Missing file name for VMCTL operand) to the ay CMSUT2 file for each language file name listed with or under that keyword (until the end of the LANGMCTL file or a valid VMCTL cntrlfn option is reached).
      5. If the control file cannot be found, message 2 (File fn ft fm not found) is issued.
    • If you do not specify a file type on the language file record and you do not specify the VMCTL cntrlfn option on either that record or a previous language file record in the LANGMCTL file, LANGMERG uses the file name from the language file record and assumes the file type is TXTlangid.

General Usage Notes

  1. Each control file name can be different.
  2. You only need to specify VMCTL on the first language file record in the LANGMCTL file.
  3. The VMCTL cntrlfn option applies to the file ID it is specified with and all subsequent file IDs until either:
    • Another VMCTL cntrlfn option is encountered
    • End of file (EOF) is reached
  4. The merged CMS object output from LANGMERG continues to have a file identifier of DMSNLS TXTlangid. This file is the latest level of the merged DMS object decks.
  5. The order of the records in the LANGMERG control file determines where the application's files will go in the saved segment. You may be able to improve your system's performance by changing the order of these files.

Examples

Use the following LANGMERG control file for CMS in uppercase English (application ID for CMS is DMS; language ID for uppercase English is UCENG):
*
* This is the LANGMERG control file for uppercase English in CMS.
* The file ID of this control file is DMSUCENG LANGMCTL.
*
DISK 19D
ETMODE OFF
MESSAGE  DMSMES (VMCTL DMSVM
PARSERS  DMSSPA
SYNONYMS DMSSSY
TRTABLES DMSTRT
USER     DMSUSE

Messages and Return Codes

  • DMS002E File fn ft fm not found [RC=28]
  • DMS006E No read/write disk accessed [RC=36]
  • DMS104S Error nn reading file fn ft fm from disk [RC=rc from EXECIO]
  • DMS105S Error nn writing file fn ft fm on disk [RC=rc from EXECIO]
  • DMS252E Invalid filename fn [RC=20]
  • DMS276E Invalid language ID langid [RC=24]
  • DMS282E Error(s) occurred while creating fn ft fm; check fn ft fm for details [RC=32]
  • DMS440W Merged text deck not created - no text decks were specified in control file fn ft fm [RC=4]
  • DMS770E Invalid application ID applid [RC=24]