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.
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
Enter either of the following system commands:
MAINMENU
(opens the menu)
or
MAINMENU OFF
(closes the menu)
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:
Notes:
%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.
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, |
Code | Input field for the code of the required function such as
Create Object.
All functions available in the Development Functions menu, are described in the following table. See also Performing a Menu Function. |
for
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:
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 |
---|---|---|---|
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: |
|||
E
|
Invokes a Natural
editor and displays the source of the specified object in modify
mode.
See also Creating and Editing Objects. |
EDIT |
|
Note: |
|||
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 |
|
R
|
Invokes the Rename Object window where you
change the name of the
specified object and/or its type.
See also Renaming Objects. |
RENAME |
|
D
|
Invokes either of the following:
|
DELETE |
|
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 |
|
L
|
Displays one of the following, depending on the input to the command: | ||
|
LIST
object-type
object-name-range
|
||
|
LIST
object-type
object-name |
||
|
LIST
object-type |
||
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
|
|
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
|
|
I |
Displays directory information on one of the following:
See also Displaying Directory Information. |
LIST DIRECTORY
object-name
|
|
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:
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.
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)
Press ENTER.
The contents of the Mode field have changed
from Reporting
to Structured
or vice
versa.
Natural Programming Modes - Programming Guide
GLOBALS - System Commands documentation
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
Disabled
Natural Editors in the Editors
documentation.
The
, and the 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
In the Name field, enter an asterisk:
*
Press ENTER.
A list of all objects available in the current library is displayed.
To list objects using a start value
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*
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 functions provide further
options to specify object name ranges as described for the equivalent system
command LIST
(see the
System Commands documentation).
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 |
---|---|---|
Assigns functions to PF keys to be used in your Natural session. |
KEY
|
|
Sets options that affect the way in which Natural objects are compiled. |
COMPOPT
|
|
Changes the settings of Natural session parameters.
See also Configuring your Natural Environment and Session Parameters in the Parameter Reference documentation. |
GLOBALS
|
|
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
|
|
Displays technical information on your Natural session such as the current user ID, library and operating system. |
TECH
|
|
Displays the current definitions of Natural system files. See also Natural System Files in the Natural System Architecture documentation. |
SYSPROF
|
|
Displays a list of the products installed at your site and information on these products. |
SYSPROD
|
|
Only available if Natural Security is installed. Displays the security profile currently in effect. |
PROFILE
|
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 |
---|---|---|
Creates and maintains messages you want to issue in your Natural applications. |
SYSERR
|
|
Creates and maintains data definition modules (DDMs). |
SYSDDM
|
|
Creates and maintains the command processors you want to use in your Natural applications. |
SYSNCP
|
|
Establishes and maintains remote procedure calls and provides the settings required to execute a Natural subprogram located on a remote server. |
SYSRPC
|
|
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 |
|
Transfers Natural objects between different libraries. |
SYSMAIN
|
|
Processes Natural objects and non-Natural objects in different Natural environments using the Object Handler. |
SYSOBJH
|
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 |
---|---|---|
Searches for errors in the processing flow of programs. |
TEST
|
|
Logs database commands. | TEST
DBLOG
|
|
Passes Adabas commands directly to the database. |
SYSADA
|
|
Monitors the Natural buffer pool and adjusts it to meet your requirements. |
SYSBPM
|
|
Monitors the buffer pool of the Software AG Editor and adjusts it to meet your requirements. |
SYSEDT
|
|
Monitors and controls TP monitor-specific characteristics of Natural. |
SYSTP
|
|
Collects monitoring and accounting data about the processing flow of a Natural application. |
SYSRDC
|
|
Provides information Software AG technical support requires for error diagnosis. |
DUMP
|
When you select Main Menu, a list of libraries is displayed. These libraries contain example programs for demonstration purposes and Application Programming Interfaces (APIs) provided by Software AG:
from the NaturalLibrary | 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. |
When you select Main Menu, a list of Software AG add-on products appears. These products are installed at your site and can be accessed from this menu.
from the Natural