Natural Environment-Related System Variables

This document covers the following topics:


*BROWSER-IO

Format/length: A8
Content modifiable: No

This system variable indicates that the application is running in a web browser. An application can run in a web browser either via the Natural Web I/O Interface or by using Natural for Ajax. An application that is running with the Natural Web I/O Interface can use maps. An application that is running with Natural for Ajax can use both maps and rich GUI pages (using the PROCESS PAGE statement).

This system variable may contain one of the following values:

Value Description
(empty) The application is not running in a web browser.
WEB The application is running with the Natural Web I/O Interface. It cannot use the PROCESS PAGE statement.
RICHGUI The application is running with Natural for Ajax. It can use the PROCESS PAGE statement.

*DEVICE

Format/length: A8
Content modifiable: No

This system variable contains the device type/mode from which Natural has been invoked. It may contain one of the following values:

Value Description
BATCH Batch mode.
VIDEO 3270 screen device, PC screen device, VT or X terminal or any type of Linux terminal.
TTY Teletype or other start/stop device.
PC Usage of Natural Connection has been activated (by profile parameter PC=ON or terminal command %+).

*GROUP

Format/length: A8
Content modifiable: No

This system variable is applicable under Natural Security only. It contains the ID via which a user is logged on to a protected library, that is, the ID via which the user is linked to the library. This may be either the ID of the group via which the user is linked or the user's own ID (if he or she is linked directly).

*GROUP will be blank under the following conditions:

  • in the case of a logon to an unprotected library (where no link is used),

  • if Natural Security is not active.

*HARDCOPY

Format/length: A8
Content modifiable: Yes

This system variable contains the name of the hardcopy device which will be used when the terminal command %H is used.

*INIT-USER

Format/length: A8
Content modifiable: No

*INIT-USER contains the value of the profile parameter USER in the parameter file used.

If no value is specified for the USER parameter, *INIT-USER contains the user ID used to log in to Linux.

*LANGUAGE

Format/length: I1
Content modifiable: Yes

This system variable contains the language indicator (language code). This language indicator is used for edit masks of date fields, Natural error messages and user error messages as used in the statements INPUT and REINPUT.

A one-character code is assigned to each language code; this one-character code is used to replace all ampersand characters (&) in names of language-specific objects (for example, maps, dialogs, helproutines, subprograms). For details on the use of the ampersand character in Natural object names, see the descriptions of the statements CALLNAT (operand1), FETCH (operand1), INCLUDE (copycode-name) and INPUT (USING MAP) and the session parameter HE (operand1).

You can specify up to 60 different language codes. The codes are listed below.

The system variable *LANGUAGE is set by the Natural profile parameter ULANG which determines the language to be used for date edit masks, system messages, user messages, help texts, help routines and multi-lingual maps.

Natural does not differentiate between compile time and run time. It always tries to read the map with the current value of *LANGUAGE first and if not found, it then tries to find the map with the default language.

For details on how to use language codes, see also Multilingual User Interfaces in the Programming Guide.

Language Code Assignments

The following languages are assigned to the individual language codes (the right-hand column shows the corresponding one-character codes to be used in names of language-specific objects):

Left-to-Right Single-Byte Languages with Latin Lower Case

Code Language Character Code in Language-Specific Object Names
1 English 1
2 German 2
3 French 3
4 Spanish 4
5 Italian 5
6 Dutch 6
7 Turkish 7
8 Danish 8
9 Norwegian 9
10 Albanian A
11 Portuguese B
12 Chinese Latin (Taiwan) C
13 Czech D
14 Slovak E
15 Finnish F
16 Hungarian G
17 Icelandic H
18 Korean I
19 Polish J
20 Romanian K
21 Swedish L
22 Croatian M
23 Catalan N
24 Basque O
25 Afrikaans P

Left-to-Right Single-Byte Languages without Latin Lower Case

Code Language Character Code in Language-Specific Object Names
26 Bulgarian Q
27 Greek R
28 Japanese (Katakana) S
29 Russian T
30 Serbian U

Bi-directional Single-Byte Languages without Latin Lower Case

Code Language Character Code in Language-Specific Object Names
31 Arabic V
32 Farsi (Iran) W
33 Hebrew X
34 Urdu (Pakistan) Y
35 (reserved for future use) Z
36 (reserved for future use) a
37 (reserved for future use) b
38 (reserved for future use) c
39 (reserved for future use) d
40 (reserved for future use) e

User-Assigned Languages

Code Language Character Code in Language-Specific Object Names
41 (free for you to assign a language) f
42 (free for you to assign a language) g
43 (free for you to assign a language) h
44 (free for you to assign a language) i
45 (free for you to assign a language) j
46 (free for you to assign a language) k
47 (free for you to assign a language) l
48 (free for you to assign a language) m
49 (free for you to assign a language) n
50 (free for you to assign a language) o

Multiple-Byte Languages

Code Language Character Code in Language-Specific Object Names
51 Hindi p
52 Malayan q
53 Thai r
54 (reserved for future use) s
55 (reserved for future use) t
56 (reserved for future use) u

Double-Byte Languages

Code Language Character Code in Language-Specific Object Names
57 Chinese (People's Republic of China) v
58 Chinese (Republic of China) w
59 Japanese (Kanji) x
60 Korean y

*NATVERS

Format/length: A8
Content modifiable: No

This system variable contains the Natural version (excluding the cumulative fix information), for example: 06.02.01.

The cumulative fix information is contained in the system variable *PATCH-LEVEL.

For further information, see Version in the Glossary.

*NET-USER

Format/length: A253
Content modifiable: No

The value of *NET-USER is identical to the one of *USER.

*PARM-USER

Format/length: A253
Content modifiable: No

This system variable contains the name of the parameter file currently in use.

*PATCH-LEVEL

Format/length: A8
Content modifiable: No

This system variable contains the current cumulative fix number. See also the system variable *NATVERS and Version in the Glossary.

*PID

Format/length: A32
Content modifiable: No

This system variable contains the current process ID as a string value.

*SCREEN-IO

Format/length: L
Content modifiable: No

This system variable indicates whether a screen I/O is possible or not.

It can contain one of the following values:

TRUE Screen I/O is possible.
FALSE Screen I/O is not possible.

*SCREEN-IO is initialized with TRUE in an interactive Natural session, a Natural batch session and when Natural was started as a Natural Development Server.

If Natural was started as a DB2 Stored Procedures server (*SERVER-TYPE=DB2-SP) or as RPC server (*SERVER-TYPE=RPC) *SCREEN-IO is set to FALSE.

When *SCREEN-IO is set to FALSE and a statement which requires user interaction is executed, Natural issues error NAT0723.

*SERVER-TYPE

Format/length: A32
Content modifiable: No

This system variable indicates the server type Natural has been started as.

It can contain one of the following values:

DB2-SP Natural DB2 Stored Procedures server
DEVELOP Natural development server
RPC Natural RPC server
WEBIO Natural Web I/O Interface server

If Natural is not started as a server, *SERVER-TYPE is set to blanks.

Note:
*SERVER-TYPE refers to Natural as a whole, not to the Natural program currently being executed (which may run as a client program or as a server program within a server Natural).

*UI

Format/length: A16
Content modifiable: No

This system variable indicates the type of user interface being used:

CHARACTER Character-oriented user interface.
GUI Graphical user interface.

*USER

Format/length: A8
Content modifiable: No

This system variable contains the user ID as taken from the Natural Security logon.

If the profile parameter AUTO=ON (Automatic Logon) is set or if Natural Security is not active, the value of *USER is identical to that of *INIT-USER.

*USER-NAME

Format/length: A32
Content modifiable: No

If Natural Security is installed, this variable contains the name of the user who is currently logged on to Natural.

If Natural Security is not active, the default is SYSTEM.