Version 4.2.6 for Mainframes (Update)
 —  System Variables  —

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.

Top of page

*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.
COLOR 3279 compatibility.

3278 screen device (device with extended attribute support).

VIDEO 3270 screen device, PC screen device, VT or X terminal or any type of UNIX terminal.
TTY Teletype or other start/stop device.
PC Usage of Natural Connection has been activated (by profile parameter PC=ON or terminal command %+).
BTX BTX device.
SPOOL 3270 printer device.
ASYNCH Asynchronous session.
BROWSER Web I/O screen device (server environment).

Top of page

*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:

Top of page

*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.

Top of page

*INIT-USER

Format/length: A8
Content modifiable: No

This system variable contains the user ID of the user.

In Online Mode:

Com-plete The value of *INIT-USER is the Com-plete logon user ID.
CICS The value of *INIT-USER is determined by the NCIPARM macro parameter SIGNON: For SIGNON=NO, any non-blank value returned by EXEC CICS ASSIGN USERID (..) is considered to be valid. For SIGNON=YES, a non-blank value returned by EXEC CICS ASSIGN USERID (..) is considered to be valid if it is different from the CICS default user ID and if the user has signed on in CICS (terminal-bound sessions only). When a CICS user ID is invalid, the edited (unpacked) CICS task number is taken for asynchronous CICS sessions. For terminal-bound sessions, the 3-byte CICS operator ID is taken when it is non-blank, otherwise the CICS terminal ID is taken.
CMS The value of *INIT-USER is the CMS logon user ID.
IMS The value of *INIT-USER is the IMS signon user ID.
TSO The value of *INIT-USER is the TSO logon user ID.
TIAM The value of *INIT-USER is determined by the parameter USERID in macro NATTIAM: If USERID=USER or NO (default), it contains the BS2000/OSD job name specified with the LOGON command; if no BS2000/OSD job name has been specified, *INIT-USER contains the same as with USERID=SYSTEM (or YES), that is, the BS2000/OSD user ID.
UTM *INIT-USER contains the user ID defined for the UTM application; if no user IDs are defined for the UTM application, *INIT-USER is identical to *INIT-ID.

In Batch-Mode:

*INIT-USER contains name of the job under which the Natural session is running.

z/OS The value of *INIT-USER is determined by the parameter USERID in the Natural z/OS batch interface (macro NTOS): If USERID=YES, the value will be taken from the security access control block (ACEE) of the security package (for example, RACF or ACF2) being used. If USERID=NO, the value of *INIT-USER is determined by the name of the job under which the Natural session is running. If no security package is used, the value will be taken from the USER parameter in the job card. If no USER parameter is specified, the value will be same as with USERID=NO.
Natural for IMS:

BMP
DLIBATCH

The value of *INIT-USER is determined by the NIMPARM macro parameter USERID. If USERID=YES, the value will be taken from the security access control block (ACEE) of the security package (for example, RACF or ACF2) being used. If USERID=NO, the value of *INIT-USER is determined by the name of the job under which the Natural session is running. If no security package is used, the value will be taken from the USER parameter in the job card. If no USER parameter is specified, the value will be same as with USERID=NO.
z/VSE The value of *INIT-USER is determined by the parameter USERID in the Natural z/VSE batch interface (macro NTVSE): if USERID=YES is specified, the following logic applies: if a VSE user ID is specified in JCL (// ID USER=xxx), this user ID is taken; otherwise if a POWER 'from-user' is specified in JCL (* $$ JOB FROM=xxx), this user ID is taken; otherwise the value will be the same as with USERID=NO, that is, the name of the job under which the Natural session is running.

Top of page

*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.

The compiler always uses only the current value of *LANGUAGE to determine the map name. During runtime, Natural tries to read the map with the current *LANGUAGE setting first. If not found, then it tries to find the map with the default language.

For details on how to use language codes, see also Designing Application 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

Top of page

*NATVERS

Format/length: A8
Content modifiable: No

This system variable contains the Natural version excluding the patch level information in the format

rr.vv.ss

where rr=release, vv=version, ss=system maintenance level (for example: 04.02.01).

The patch level information is contained in the variable *PATCH-LEVEL.

Top of page

*NET-USER

Format/length: A253
Content modifiable: No

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

Top of page

*PARM-USER

Format/length: A253
Content modifiable: No

This system variable contains the name of the parameter module currently in use (if PARM=name has not been specified as a dynamic parameter, *PARM-USER contains blanks).

Top of page

*PATCH-LEVEL

Format/length: A8
Content modifiable: No

This system variable contains the current patch-level number as a string value. See also *NATVERS.

Top of page

*PID

Format/length: A32
Content modifiable: No

This system variable contains a unique session ID.

Top of page

*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.

In an interactive Natural session, *SCREEN-IO is initialized with TRUE. In a Natural batch session, *SCREEN-IO is initialized with FALSE (except for 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.

Top of page

*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).

Top of page

*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.

Top of page

*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.

Top of page

*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.

Top of page