CBL_NLS_OPEN_MSG_FILE

Open a National Locale Support (NLS) message file.
Restriction: National Locale Support is only supported for native COBOL code.

Syntax:

call "CBL_NLS_OPEN_MSG_FILE" using     msg-filename
                                       msg-filename-ln
                                       msg-file-handle
                             returning status-code

Parameters:

  Using call prototype (see Key) Picture
msg-filename pic x(n). pic x(n).
msg-filename-ln cblt-x1-compx. pic x comp-x.
msg-file-handle cblt-x4-compx. pic x(4).
status-code See Library Routines - Key.

On Entry:

msg-filename
The name of the message file to be opened.
msg-filename-ln
The length of msg-filename.

On Exit:

msg-file-handle
The identifying handle.
status-code
Indicates whether the routine was successful:
0 Success
403 Resulting message too long
405 Illegal or empty supplied file name
If status-code contains a value other than these, it is the number of a run-time error message.

Comments:

This routine opens an NLS message file (Windows) or catalog (UNIX) returning an identifying handle that you can use with the CBL_NLS_READ_MSG and CBL_NLS_CLOSE_MSG_FILE routines.

Windows: You can create different message files for each language you want your program to work with, using the same call to access each message in the appropriate national language. You can use a default message file, or create your own.

UNIX: Message catalogs are searched for in the directories specified in the $NLSPATH environment variable. If $NLSPATH contains the %L element, the user can choose the language in which they want messages by setting the $LC_MESSAGES or $LANG environment variables at run-time. You create message catalogs using the gencat command.