call "CBL_NLS_READ_MSG" using msg-file-handle full-msg-number msg-ins-struct msg-buffer returning status-code
01 cblt-nls-msg-number-pair. 03 cblte-nmnp-set-number cblt-x2-compx. *> pic x(2) comp-x. 03 cblte-nmnp-number cblt-x2-compx. *> pic x(2) comp-x.
01 cblt-nls-msg-ins-struct. 03 cblte-nmis-ins-count cblt-x2-compx. *> pic x(2) comp-x. 03 cblte-nmis-ins-pointer cblt-pointer. *> usage pointer occurs n times *> depending on cblte-nmis-ins-count.
01 cblt-nls-msg-buffer. 03 cblte-nmb-buf-len cblt-x2-compx. *> pic x(2) comp-x. 03 cblte-nmb-buf-text cblt-x2-compx. *> pic x(n) occurs n times *> depending on cblte-nmb-buff-len.
0 | Success |
40 | NLS module not initialized |
401 | Message set not found |
402 | Message not found in set |
403 | Message too long for message text buffer |
404 | Invalid msg-file-handle |
In each message catalog, messages can be divided into sets. Each message in a set has an identifying message number. Message catalogs are explained in more detail in the section Writing NLS Message Files in the chapter Internationalization Support in the book Program Development.
This routine also enables you to insert portions of text in a message fetched from the message catalog, replacing any %s formatting sequences in the original message. There must not be more %s formatting sequences than cblte-nmis-ins-count.
The inserted portions of text can be inserted in the order appropriate to the rules of the grammar for the national language. This is achieved using the %n$s formatting syntax, where n is the nth cblte-nmis-ins-pointer. The value of n must not exceed cblte-nmis-ins-count.
Comments (Windows):
In each message file, messages are divided into sets; this enables you to define your own message set in the default message file if you want. This routine also enables you to insert portions of text in a message fetched from the message file in the order appropriate to the rules of the grammar for the national language