The following topics are covered:
In Natural, session parameters are used:
to specify certain characters,
to set processing time limits,
to set a particular response for a given condition,
to set various size limits,
to determine various aspects of output reports.
At the installation of Natural, the Natural administrator sets these parameters to default values which are then valid for all users of Natural.
To see which parameter values apply to your session, you enter the
system command GLOBALS
(described in the
System Commands documentation).
Natural session parameters can be set in several ways:
via the default Natural parameter file
NATPARM
, which is set when Natural is installed;
via dynamic parameters specified when invoking Natural (as described in your Natural Operations documentation);
via the system command
GLOBALS
;
via a SET
GLOBALS
statement (in reporting mode only);
via a FORMAT
statement;
via parameter specification within statements where parameters also
are evaluated, for example, INPUT
,
DISPLAY
,
WRITE
;
via terminal commands.
Instead of the parameter values ON
and OFF
,
you can also specify T
(true) or F
(false)
respectively.
For your Natural session you can change some of the parameter values set by the Natural administrator.
Within your Natural session, you can change these parameters by issuing the following system command:
When you issue the GLOBALS
command, a screen
is displayed showing the parameter values that are currently in effect for your
session. On this screen, you can change the values that do not suit your
requirements.
A parameter value set with a GLOBALS
command
remains in effect until the end of the Natural session (and applies to every
object you store during the session), unless you change it again with another
GLOBALS
command.
You can change certain parameters for the duration of a single program
(report). This is done by using a FORMAT
statement in the program,
which will override the session-wide settings for these parameters.
FORMAT AL=10 HC=R
Parameters set with a FORMAT
statement apply until the
end of the executed program, unless they are changed with another
FORMAT
statement in the program.
Not all session parameters can be changed at program level, while several parameters that can be specified at program level cannot be specified at session level; most of the latter are parameters which affect the format of an output report.
Most of the parameters you can change with a
FORMAT
statement you can also change for an individual statement; for example, for a
particular DISPLAY
,
WRITE
,
INPUT
or
REINPUT
statement.
This is done by specifying the parameter (in parentheses) after the statement name.
DISPLAY (SF=4) NAME JOB-TITLE CURR-CODE SALARY
A parameter set at statement level applies only to the statement in which it is specified. The setting at statement level overrides, for that statement only, all other settings of that parameter at other levels.
Within a DISPLAY
,
WRITE
,
INPUT
or
REINPUT
statement,
you can also change some parameters for an individual field or output
element.
This is done by specifying the parameter (in parentheses) after the field name.
DISPLAY NAME (AL=10) JOB-TITLE CURR-CODE SALARY
The parameter value then applies only to that field. The setting at field level overrides, for that field only, all other settings of that parameter at other levels. However, only some of the parameters that can be set at statement level can also be set at field level.
Parameters specified with the statements
DISPLAY
,
FORMAT
,
PRINT
,
INPUT
,
REINPUT
,
WRITE
,
WRITE TITLE
and
WRITE TRAILER
are
processed during program compilation and are therefore included in the
corresponding object module for the program.
The following hierarchy is used for evaluation:
Parameters set at element/field (highest priority)
Parameters set at statement level
Parameters set with a FORMAT
statement
The default parameter settings (lowest priority)
Parameters set with a SET
GLOBALS
statement cause the execution time environment to be
modified. These modifications remain in effect until overridden by another
SET GLOBALS
statement (or
GLOBALS
system command).