Version 4.2.6 for Mainframes
 —  Operations  —

Natural Text Modules

This document describes the Natural text modules NATTEXT, NATTXT2 and NATTXT3. It covers the following topics:


Function and Usage of Text Modules

All Natural keywords, alternative keywords and standard output text are contained in the modules NATTEXT and NATTXT2. Natural system commands and alternate system commands are also included as keywords and alternative keywords in these modules. Substitution text fragments for Natural error messages are contained in module NATTXT3. The modules are contained in source form in the Natural source library and in load module form in the Natural load library.

If necessary, you can modify Natural keywords, alternative keywords and text contained in these modules. For example, Natural session termination messages can be changed from English to another language, Natural keywords can be disabled, or synonyms can be added.

If any modifications are made to a NATTEXT, NATTXT2 or NATTXT3 module, each modified module must be assembled, link-edited and included into the executable Natural module, refer to the Natural Installation documentation.

Top of page

NATTEXT Module

The NATTEXT module contains NTKEY and NTALT macros for each keyword and alternative keyword to be recognized by Natural.

Modifying NATTEXT

Warning:
It is recommended that you modify the NATTEXT module for very important reasons only, because once modified, it can no longer be properly maintained by Software AG personnel.

The following rules apply:

Example of Modifying the NATTEXT Module

The following example illustrates how a NATTEXT module is modified. In this example

NATTEXT before modification:

STATNAM NTKEY FIND 
        NTALT BROWSE
        NTALT GET
        NTALT ACCEPT
        NTALT REJECT
        NTALT HISTOGRAM  

NATTEXT after modification:

STATNAM NTKEY FIND
        NTSYN RECHERCHE
        NTALT BROWSE
        NTSYN LISEZ
        NTALT %
        NTALT ACCEPT
        NTALT REJECT
        NTALT %

Top of page

NATTXT2 Module

The NATTXT2 module contains the macros NTKEYT, NTALTT, NTSYNT and NTERMSG which define the following:

Standard Natural Output Texts

The module NATTXT2 contains the following standard Natural output texts, each of which can also be displayed in another language if the language code is set accordingly (see also below):

Any values contained in NATTXT2 can be modified by replacing the current text with the desired text. If a month-name synonym exceeds nine characters, only the first nine positions are used by the system variable *DATG.

NTSYNT macro statements can be added as described for module NATTEXT. However, with NATTXT2, a second parameter can be specified. This parameter is optional and represents the language indicator to be used for the synonym. When you specify the language indicator, Natural produces message output resulting from the use of this synonym in the corresponding language. In addition, if error message texts have been stored in the Natural system file using a language indicator other than 1 (which is the default and stands for English), error messages are returned in the corresponding language. For information on which language code stands for which language, refer to the profile parameter ULANG.

Keywords and Alternative Keywords for Natural System Commands and Utilities

The module NATTXT2 contains NTKEYT and NTALTT macros for each keyword and alternative keyword to be recognized by Natural for the following Natural system commands and utilities, parameters of commands and their values when applicable. Each of these can also be used in another language if the language code is set accordingly (see also below):

The NTKEYT and NTALTT macro statements can be used similar to the NTKEY and NTALT macro statements as described for module NATTEXT.

The NTSYNT macro statements can be used as described under Standard Natural Output Texts.

Natural Termination Messages and Return Codes

Natural has a number of standard session termination messages (NAT99...) that are delivered in macro NTERMSG and can be modified there (for example, to translate them it into another language). The overall length of ID and text can be up to 72 characters. After the macro NTERMSG has been modified, the Natural parameter module and if supplied in source code, the environment dependant driver have to be re-assembled and linked.

Apart from the message ID and text, each standard termination message also includes one of the following Natural system return codes, which are also defined within macro NTERMSG:

Code Explanation
0 Normal termination.
4 Error occurred during execution/compilation (batch mode only).
8 Termination due to severe runtime error.
12 Session initialization failure.
16 Abnormal termination due to abend or severe environment failure..

User-written termination messages can be added to NATXT2 for all return codes (1 - 255) which can be issued with a TERMINATE statement and which normally lead to the Natural termination message NAT9987.

For user-written termination messages, the corresponding return code must be specified as the second parameter.

With the profile parameter TS set to ON, the termination messages are translated to upper case using the upper case translation table NTUTAB1 as supplied in the NATCONFG module before they are displayed.

In addition to TS=ON, further parameters to provide for translation of messages into upper case are provided by several Natural components. For further information, see Other Parameters to Provide Upper Case Translation in the TS profile parameter description.

Example of a User Termination Message:

NTERMSG 'USR0077 THIS IS A SAMPLE USER MESSAGE FOR RETURN CODE 77',77

Top of page

NATTXT3 Module

The NATTXT3 module contains the macros to define the text fragments which will be used to substitute the :n: place holder in Natural error messages.

Each text fragment can be defined in various languages. For information on which language code stands for which language, refer to the ULANG parameter.

The text fragments will be generated in EBCDIC and Unicode notation.

Note:
To assemble the NATTXT3 module, a high level assembler must be used which supports the macro function UPPER and the definition of unicode characters (DC CU’unicode text).

Example:

The text for Natural error NAT0082 (when trying to execute a non existing program) looks as follows:

Invalid command, or :1: :2: does not exist in library.

Trying to execute the object NOTEXIST leads to following result:

NAT0082 Invalid command, or Program NOTEXIST does not exist in library.

:2: was replaced by the object name (NOTEXIST).

:1: was replaced by the text fragment Program.

The text fragment was declared in module NATTXT3 as follows:

*=============================================================== 
*              PROGRAM                  0002                     
*=============================================================== 
      MSGSDEF  &LC_PGM                                           
         SPACE                                                   
*--------------------------------------------------------------- 
      MSGSLAN  01,Program           1   ENGLISH                  
      MSGSLAN  02,Programm          2   GERMAN                   
      MSGSLAN  03,programme         3   FRENCH                   
      MSGSLAN  04,programma         4   SPANISH                  
         SPACE                                                   
*--------------------------------------------------------------- 
      MSGSGEN   

Text fragment values for additional languages may be entered by adding further MSGSLAN macros.

Top of page