Natural Main Menu

#### Search Results

Search

# Natural Main Menu

The Natural Main Menu provides access to Natural development functions, environment settings, utilities and example libraries.

This section contains information on the functions and input options provided by the Natural Main Menu and its subordinate menus.

- Invoking or Closing the Natural Main Menu

- Development Functions

- Development Environment Settings

- Maintenance and Transfer Utilities

- Debugging and Monitoring Utilities

- Example Libraries

- Other Products

## Invoking or Closing the Natural Main Menu

There are two methods of invoking or closing the Natural Main Menu:

- You can define a default setting by switching menu mode on or off. Menu mode causes the Natural Main Menu to be invoked automatically for the next session started.

- You can invoke or close the Natural Main Menu within a Natural session whenever required.

To switch menu mode on or off before session start

- At Natural startup, specify either of the following profile parameters:

      MENU=ON

  (activates menu mode)

  or

      MENU=OFF

  (deactivates menu mode)

  See also MENU in the Parameter Reference documentation.

To open or close the Natural Main Menu within a session

1. Enter either of the following system commands:

       MAINMENU

   (opens the menu)

   or

       MAINMENU OFF

   (closes the menu)

2. Press ENTER.

The Natural Main Menu looks similar to the example shown below:

    10:20:23                    *****  NATURAL  *****                    2009-05-20
    User SAG                        - Main Menu -                Library TEST

                       Function

                    _  Development Functions
                    _  Development Environment Settings
                    _  Maintenance and Transfer Utilities
                    _  Debugging and Monitoring Utilities
                    _  Example Libraries
                    _  Other Products
                    _  Help
                    _  Exit Natural Session

    Command ===>

    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
          Help        Exit                                                  Canc

At session start, Natural assigns you to a default library that is indicated on the screen. In the example screen above, the ID (name) of the library is shown in the Library field in the top right-hand corner of the screen. See also Default Library Assignment.

For instructions on performing a menu function, refer to the relevant section in Using Commands and Menu Functions.

Each function listed in the Natural Main Menu invokes a menu of the corresponding name where you can select further functions:

Function in Natural Main Menu | Explanation of Functions in Corresponding Menu
--- | ---
Development Functions | Creates and maintains programs, maps, data areas and other components that make up a Natural application.
Development Environment Settings | Displays and modifies various settings that affect your Natural session.
Maintenance and Transfer Utilities | Invokes a Natural utility to create and maintain certain objects or transfer them to another environment.
Debugging and Monitoring Utilities | Invokes a Natural utility to monitor your Natural applications and locate errors in their processing flow.
Example Libraries | Selects libraries containing example programs and Application Programming Interfaces (APIs).
Other Products | Invokes other products.

Notes:

1. The position and color of the message line and PF-key lines in the Natural Main Menu and its subordinate menus can be changed with the user exit routine USR2003P described in the Operations documentation.
2. When the Natural Main Menu is active, the environment settings of this menu are used (see also USR2003P) and restored automatically each time the menu is called. As a result, terminal commands (for example, `%L` or `%U`) and system variables (for example, `*STARTUP`) may not function properly. You can save and restore the environment settings of your own application by using the Application Programming Interface USR1002N, which is supplied in the system library SYSEXT.

## Development Functions

The functions listed in the Development Functions menu are those you will need most frequently when you develop an application with Natural. The functions apply to all Natural objects that are available in the library where you are currently logged on.

The table below contains information on the fields provided in the Development Functions menu:

Field | Explanation
--- | ---
User | The ID of the Natural user who logged in to the current session.
Library | The name of the current library. To log on to a different library, replace the name. See also the section Using Natural Libraries.
Mode | The current programming mode: reporting or structured mode. To switch modes, enter either `R` (reporting) or `S` (structured). See also Programming Modes.
Work area empty | Indicates that no source has been loaded into the source work area. If a source has already been loaded into the source work area, the type and the name of the object will be displayed instead, for example, `Program PROGX`.
Code | Input field for the code of the required function such as C for Create Object. All functions available in the Development Functions menu, are described in the following table. See also Performing a Menu Function.
Type | Input field for the object type such as `P` for object type program. For details, see Objects for Natural Application Management in the Programming Guide. To obtain a list of all object types available for the specified function, enter a question mark (?) in the Type field. You can leave the Type field blank if you specify the name of a Natural object that already exists. To change the object type within the editor, proceed as described in Setting the Object Type.
Name | Input field for the name of a single object or a range of names (if ranges are allowed for the specified function). For valid object names, see Object Naming Conventions. For valid name ranges, see Specifying Object Ranges.
Command ===> | The command line in which you can enter a Natural command. For example: To edit an existing program named PROGX, you would enter the following system command: `EDIT PROGX` See also Using Commands and Menu Functions.
PF (function keys) | The PF keys (function keys) that can be used instead of commands or menu functions. The PF-key lines at the bottom of the screen indicate which function is assigned to which key. See also Standard PF Keys.

The table below contains information on the functions provided in the Development Functions menu. For most of the menu functions, there are equivalent Natural system commands. These alternative system commands are listed in the table and further explained in the relevant sections in the System Commands documentation.

Function | Code | Explanation | Equivalent System Command
--- | --- | --- | ---
Create Object | `C` | Invokes a Natural editor where you can create a new object such as a program, map or data area. Specify the type and the name of the object to be created. See also Creating and Editing Objects. | `EDIT object-type`
Note This function and equivalent command are not available if the Natural program, data area, and map editor are disabled in your environment. For more information, see NaturalONE as the Default Development Environment in the Editors documentation.
Edit Object | `E` | Invokes a Natural editor and displays the source of the specified object in modify mode. See also Creating and Editing Objects. | `EDIT`
Note You can perform this function and equivalent command only on objects of the type `D` (Description) if the Natural program, data area, and map editor are disabled in your environment. For more information, see NaturalONE as the Default Development Environment in the Editors documentation.
Execute Program | `X` | Executes the specified object of type program. Other object types cannot be executed by themselves, but must be invoked from another object. See also Executing Programs. | `EXECUTE`
Rename Object | `R` | Invokes the Rename Object window where you change the name of the specified object and/or its type. See also Renaming Objects. | `RENAME`
Delete Objects | `D` | Invokes either of the following: The Delete window for the specified object. In the Delete window, confirm the deletion by entering the name of the object again in the relevant input field. A selection list of objects if a range of names is specified. In this selections list, you can mark one or more objects for deletion. | `DELETE`
Scan Objects | `S` | Invokes the Scan menu to search for and replace character strings within single or multiple objects. You need not fill the Type and Name fields, which are not evaluated on this screen. | `SCAN`
List Objects or Single Source | `L` | Displays one of the following, depending on the input to the command:
A selection list of objects if a range of objects is specified. See also Displaying a List of Objects and List of Objects for information on using the selection screen. | `LIST object-type object-name-range`
The source code of the specified object. See also Displaying an Individual Source Code. | `LIST object-type object-name`
The source code currently contained in the editing area if no object name is specified. See also Listing the Contents of the Work Area. | `LIST object-type`
List Source with Expanded Sources | `O` | Displays the source code of the specified object with the sources of other objects referenced by the specified object. | `LIST object-name EXPAND object-type`
List Extended Object Names | `N` | Displays a selection list of extended (long) names of cataloged subroutines, classes and functions. See also Displaying Long Names of Cataloged Subroutines and Classes. | `LIST EXTENDED object-type object-name`
List Directory Information | `I` | Displays directory information on one of the following: The specified object. The object currently contained in the editing area if no object is specified. Several objects in sequence if a range of objects is specified. See also Displaying Directory Information. | `LIST DIRECTORY object-name`
List Used Subroutines, etc. | `U` | Lists all cataloged objects in the current library showing which objects performs which subroutines, and which objects contain definitions for a subroutine, class or function. The list contains both object names and extended (long) names. | `ROUTINES`

This section covers the following topics:

- Programming Modes

- Natural Editors

- Specifying Object Ranges

### Programming Modes

Natural offers two programming modes: reporting mode and structured mode. We recommend that you exclusively use structured mode, because it provides for more clearly structured applications. Therefore, all explanations and examples in the Natural tutorial First Steps and the Editors documentation refer to structured mode. Any peculiarities of reporting mode will not be taken into consideration.

For further information on programming modes, see the section Natural Programming Modes in the Programming Guide.

The Mode field in the top right-hand corner of the Development Functions menu indicates the programming mode currently in effect: structured or reporting.

To switch programming modes

1. In the upper right-hand corner of the Development Functions screen, in the Mode field, overwrite the first position with an `S` to switch on structured mode, or an `R` to switch on reporting mode.

   Or:
   Enter either of the following system commands:

       GLOBALS SM=ON

   (switches on structured mode)

   or

       GLOBALS SM=OFF

   (switches on reporting mode)

2. Press ENTER.

   The contents of the Mode field have changed from `Reporting` to `Structured` or vice versa.

#### Related Topics:

- Natural Programming Modes - Programming Guide

- GLOBALS - System Commands documentation

### Natural Editors

Depending on the type of object specified in the Development Functions menu, Natural invokes the appropriate editor: the program editor, the map editor or the data area editor. For further information on these editors, see the relevant sections in the Editors documentation.

Note
The Natural program, data area, and map editor have been disabled in your environment by default. For more information, see NaturalONE as the Default Development Environment in the Editors documentation.

### Specifying Object Ranges

The Edit Object, Delete Objects and the List functions provide the option to either specify the name of an individual object or a range of names. When you specify a range of names, a list of objects is displayed from which you can select one or more objects you want to edit or list, or mark for deletion.

To list all objects

1. In the Name field, enter an asterisk:

       *

2. Press ENTER.

   A list of all objects available in the current library is displayed.

To list objects using a start value

1. In the Name field, enter a start value followed by an asterisk (*).

   This option to enter a value followed by an asterisk is referred to as asterisk notation.

   For example:

       AB*

2. Press ENTER.

   A list of all objects with names that start with AB (for example, AB, AB1, ABC, ABEZ) is displayed for the current library. The list does not include object names that start with AA1 or ACB, for example.

Note
The List functions provide further options to specify object name ranges as described for the equivalent system command `LIST` (see the System Commands documentation).

## Development Environment Settings

The table below contains brief descriptions of the functions provided in the Development Environment Settings menu, and lists the Natural system commands that correspond to these functions. For further information on a system command, refer to the relevant section in the System Commands documentation.

Function | Explanation | Correspond. Command
--- | --- | ---
Function-Key Settings | Assigns functions to PF keys to be used in your Natural session. | `KEY`
Compilation Settings | Sets options that affect the way in which Natural objects are compiled. | `COMPOPT`
Session Parameter Settings | Changes the settings of Natural session parameters. See also Configuring your Natural Environment and Session Parameters in the Parameter Reference documentation. | `GLOBALS`
Profile Parameter Settings | Changes the settings of Natural profile parameters. Profile parameters are described in the Parameter Reference documentation and in Profile Parameter Usage in the Operations documentation. The system command `SYSPARM` invokes a utility of the same name that is described in the Utilities documentation. | `SYSPARM`
Technical Session Information | Displays technical information on your Natural session such as the current user ID, library and operating system. | `TECH`
System File Information | Displays the current definitions of Natural system files. See also Natural System Files in the Natural System Architecture documentation. | `SYSPROF`
Product Installation Information | Displays a list of the products installed at your site and information on these products. | `SYSPROD`
Security Profile Information | Only available if Natural Security is installed. Displays the security profile currently in effect. | `PROFILE`

## Maintenance and Transfer Utilities

The table below contains brief descriptions of the functions provided in the Maintenance and Transfer Utilities menu, and lists the Natural system commands that correspond to these functions. Each of these commands invokes a Natural utility that is described in the Utilities documentation.

Function | Explanation of Utility | Correspond. Command
--- | --- | ---
Maintain Error Messages | Creates and maintains messages you want to issue in your Natural applications. | `SYSERR`
Maintain DDMs | Creates and maintains data definition modules (DDMs). | `SYSDDM`
Maintain Command Processors | Creates and maintains the command processors you want to use in your Natural applications. | `SYSNCP`
Maintain Remote Procedure Calls | Establishes and maintains remote procedure calls and provides the settings required to execute a Natural subprogram located on a remote server. | `SYSRPC`
Maintain Code Page Information | Provides information on code pages and ICU (International Components for Unicode) data files used in the current Natural environment, changes code page assignments and converts code pages for source objects. | `SYSCP`
Transfer Objects to Other Libraries | Transfers Natural objects between different libraries. | `SYSMAIN`
Transfer Objects to Other Systems | Processes Natural objects and non-Natural objects in different Natural environments using the Object Handler. | `SYSOBJH`

## Debugging and Monitoring Utilities

The table below contains brief descriptions of the functions provided in the Debugging and Monitoring Utilities menu, and lists the Natural system commands that correspond to these functions. Each of these commands invokes a Natural utility that is described in the Utilities documentation.

Function | Explanation of Utility | Correspond. Command
--- | --- | ---
Debugging | Searches for errors in the processing flow of programs. | `TEST`
Logging of Database Calls | Logs database commands. | `TEST DBLOG`
Issuing Adabas Calls | Passes Adabas commands directly to the database. | `SYSADA`
Buffer Pool Maintenance | Monitors the Natural buffer pool and adjusts it to meet your requirements. | `SYSBPM`
Editor Buffer Pool Maintenance | Monitors the buffer pool of the Software AG Editor and adjusts it to meet your requirements. | `SYSEDT`
TP-Specific Monitoring | Monitors and controls TP monitor-specific characteristics of Natural. | `SYSTP`
Data Collection and Tracing | Collects monitoring and accounting data about the processing flow of a Natural application. | `SYSRDC`
Error Information on Abnormal Termination | Provides information that support requires for error diagnosis. | `DUMP`

## Example Libraries

When you select Example Libraries from the Natural Main Menu, a list of libraries is displayed. These libraries contain example programs for demonstration purposes and Application Programming Interfaces (APIs):

Library | Contents
--- | ---
SYSEXPG | Example programs shown and referred to in the Programming Guide.
SYSEXSYN | Example programs shown and referred to in the Statements documentation and the System Variables documentation.
SYSEXV | Example programs that illustrate new Natural features.
SYSEXT | APIs and example programs for using the APIs. See also the system command SYSEXT described in the System Commands documentation.
SYSEXTP | Example programs and APIs for specific functions that apply only under certain TP monitors.

## Other Products

When you select Other Products from the Natural Main Menu, a list of add-on products appears. These products are installed at your site and can be accessed from this menu.

### On this page

- Invoking or Closing the Natural Main Menu
- Development Functions
- Development Environment Settings
- Maintenance and Transfer Utilities
- Debugging and Monitoring Utilities
- Example Libraries
- Other Products