Using Session Parameters

#### Search Results

Search

# Using Session Parameters

When you start Natural Studio, the Natural parameter file (which contains the so-called "profile parameters") is read to determine the settings of several parameters which customize Natural to your specific environment and requirements. Some of these parameters can be updated after the Natural session is up and running; these are the so-called "session parameters".

Note
The profile parameters are defined with the Configuration Utility. It is possible to start Natural Studio with your own parameter file. See Invoking Natural with an Alternative Parameter File in the Configuration Utility documentation.

Modifications to the session parameters are only valid for the current session. When you exit Natural, your modifications are discarded. The next time you start Natural Studio, the settings in the Natural parameter file (which are defined with the Configuration Utility) are used again.

Note
This default behavior can be changed by setting the profile parameter `PERSIST` in the Configuration Utility.

This document describes parameters that can be updated during a running session. The following topics are covered below:

- Invoking the Natural Session Parameters Window

- Locating and Changing a Parameter

- Character Assignments

- Command Execution

- Compiler Options

- Date Representation

- Error Handling

- Field Appearance

- Limits

- Report Parameters

- Remote Procedure Call

For a full description of all available session parameters, see the Parameter Reference or follow the links provided in this section.

When you are working in a remote development environment using SPoD, the Natural Session Parameters window may contain parameters which do not apply to the Windows version of Natural and which are not listed in this document. See the Natural documentation for the corresponding platform for further information on these parameters.

## Invoking the Natural Session Parameters Window

A separate application is available for setting the Natural session parameters. This application is invoked from Natural Studio.

To invoke the Natural Session Parameters window

- From the Tools, choose Session Parameters.

  Note
  This corresponds to issuing the system command `GLOBALS` without parameters.

  The following window appears.

  When you select a node for a parameter group in the tree, the corresponding parameters are shown on the right of the window.

## Locating and Changing a Parameter

You can locate a parameter in different ways:

- If you know in which parameter group the parameter can be found, you can expand the tree and select the node.

- If you do not know the parameter group, you can search for the parameter.

To locate and change a parameter

1. Select the parameter group containing the parameter that you want to change.

   The names of the Natural session parameters are shown in parenthesis on the right of the window, behind the label of the corresponding control. Example:

   Or:
   Expand the node for a parameter group.

   Descriptions for the parameters are shown in the tree, below the node. When you select a description in the tree, all parameters for this group are shown on the right of the window. For the description that has been selected in the tree, the corresponding parameter is also selected on the right of the window and can be modified immediately.

2. Set the parameter to the required value (see the remainder of this section for further information).

   Note
   The following applies for check boxes: when a check box is selected, the corresponding parameter is set to "ON"; when a check box is not selected, the corresponding parameter is set to "OFF".

   When a parameter has been changed, an asterisk (*) appears next to the top-level node in the tree.

3. Optional. From the File menu, choose Restore Saved to discard your modifications and thus to restore the settings to the last saved state.

   Or:
   Choose the following toolbar button:

4. From the File menu, choose Save to save your modifications.

   Or:
   Choose the following toolbar button:

   Or:
   Press CTRL+S.

   The new settings are now used in Natural Studio.

5. Close the window in which you have set the session parameters.

To find a parameter

1. From the Edit menu of the Natural Session Parameters window, choose Find.

   Or:
   Press CTRL+F.

   When the toolbar is currently not shown, it is automatically activated and the drop-down list box containing the parameters is opened.

   Note
   When the toolbar is already visible, you can simply open the drop-down list box, without having to use the above command.

2. Select the parameter from the drop-down list box in the toolbar.

   The parameter group containing the selected parameter is shown on the right of the window. You can now change the parameter setting and save your changes as described above.

#### Alternatives

Session parameters can also be set as follows:

- Enter the system command `GLOBALS` with the required parameter in the command line (session level).

- Reporting mode only: use the statement `SET GLOBALS` with the required parameter in a Natural program (program level).

- Set the session parameter(s) at the statement and/or field level with certain Natural statements (`FORMAT`, `DISPLAY`, `INPUT`, `REINPUT`, `WRITE`, `PRINT`).

## Character Assignments

The following session parameters are used to change default character assignments.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Terminal command character | `CF`
Decimal character | `DC`
Input assign character | `IA`
Input delimiter character | `ID`
Thousands separator character | `THSEPCH`

All character assignments must be mutually exclusive.

## Command Execution

The following session parameter is used to control the execution of commands.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Disable Natural commands | `NC`

## Compiler Options

The following session parameters are used to set options for the Natural compiler.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Interpretation of database field short names | `DBSHORT`
Dump generation | `DU`
Length/format specification | `FS`
Structured mode | `SM`
Endian mode | `ENDIAN`
Generation of global format identifiers | `GFID`
Active cross reference | `XREF`

See also Compiler Options in the Configuration Utility documentation and the description of the system command `COMPOPT`.

## Date Representation

The following session parameters are used to control the representation of dates.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Date format in output | `DFOUT`
Date format in STACK | `DFSTACK`
Date format in report titles | `DFTITLE`

## Error Handling

The following session parameters are used to control error handling within Natural.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Automatic REINPUT | `REINP`
Sound terminal alarm | `SA`
Record hold processing | `WH`
Zero division | `ZD`
Code page conversion error | `CPCVERR`

## Field Appearance

The following session parameters influence I/O handling.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Filler chars protected | `FCDP`
Overwriting protected | `OPF`
Zero printing | `ZP`
Message line position | `ML`
Print mode | `PM`

## Limits

The following session parameters are used to prevent a single program from consuming an excessive amount of internal resources.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Error on loop limit | `LE`
Processing loop limit | `LT`

## Report Parameters

The following session parameters are used to control various attributes of Natural reports.

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Page eject | `EJ`
Line size | `LS`
Page size | `PS`
Spacing factor | `SF`
Default input terminal mode | `IM`

## Remote Procedure Call

The following session parameters apply to the Natural Remote Procedure Call (RPC).

Option | See the Parameter Reference for a description of this session parameter
--- | ---
Retry service on alternative server | `TRYALT`
Send-buffer compression | `COMPR`
Request timeout | `TIMEOUT`

### On this page

- Invoking the Natural Session Parameters Window
- Locating and Changing a Parameter
- Character Assignments
- Command Execution
- Compiler Options
- Date Representation
- Error Handling
- Field Appearance
- Limits
- Report Parameters
- Remote Procedure Call