This section gives an overview of which Natural objects are edited with which Natural editor. In addition, it contains information on split-screen mode and the editor profile.
You invoke a Natural editor with the system command
EDIT
as described in the System Commands documentation and in
Creating
and Editing an Object in the Using
Natural documentation. For the names to be used when editing or
saving an object, see
Object
Naming Conventions in the Using
Natural documentation.
Which editor is invoked depends on the type of object you want to edit:
Programs, subprograms, subroutines, helproutines, classes, copycode, text objects and functions are created and edited in the program editor.
Global data areas, local data areas and parameter data areas are created and edited in the data area editor.
Maps and help maps are created and edited in the map editor.
Predict descriptions are edited in the Predict description editor (see the Predict 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.
An online help system is provided with each editor.
Tutorials which introduce you to the main features of the editors are provided in First Steps and in the Map Editor Tutorial.
In addition to the Natural editors, the Software AG Editor is used by several Natural utilities and other Software AG products. You can also use the Software AG Editor as an alternative to the Natural program editor.
This section covers the following topics:
You can use all three Natural editors in split-screen mode: you can use one half of the screen for editing an object and at the same time have another Natural object displayed in the other half. Split-screen mode can be used to display a view (DDM; Data Definition Module), a data area, a Predict program description or a Natural program in the lower half of the screen. In addition, you can include items shown in the display section of the screen into the editing section that is, into the object you are currently editing.
The following figure shows the program editor in split-screen mode with the source code of a program in the editing section (upper half) and a local data area in the display section (lower half):
> > + Program SAGDEMO Lib SAGTEST Top ....+....1....+....2....+....3....+....4....+....5....+....6....+....7. 0010 DEFINE DATA LOCAL USING L-INVOIC 0020 LOCAL USING L-INV-LN 0030 END-DEFINE 0040 * 0050 READ INVOICE-VIEW BY INVOICE-NO FROM 1 0060 * 0070 FIND INVOICE-LINE-VIEW WITH INVOICE-NO = INVOICE-NO (0050) 0080 DELETE 0090 END-FINE 0100 * ....+....1....+....2....+....3....+....4....+....5....+.. S 16 L 1 Split All Local L-INVOIC Library SAGTEST 0010 V 1 INVOICE-VIEW INVOICE 0020 2 CUST-NO N 8 0030 2 INVOICE-NO N 8 0040 2 DATE A 8 0050 2 AMOUNT N 9.2 0000 0000 0000 0000 |
The following commands can be used to display and position an object in split-screen mode when using the program editor or the data area editor. For instructions on displaying objects in split-screen mode with the map editor, see Selecting Data Definitions in the Map Editor documentation.
All commands begin with an S
or with
SPLIT
to indicate split screen mode. The
SPLIT
command is a
cursor-sensitive
command as described in the section Program
Editor.
In the following table, an underlined text portion represents an acceptable command abbreviation.
name is the name of the object as contained in the Natural library and/or the Natural system file.
A library can be specified with the program editor only. Under Natural Security, a library cannot be specified.
The Natural program editor and data area editor provide an editor profile, which determines the settings to be in effect during the current program editor or data area session. Editor profile settings are, for example, the standard assignment of PF and PA keys. You can define your own editor profile settings according to your preferences.
This section covers the following topics:
To invoke your current editor profile
In the command line of the program editor or data area editor, enter the following:
PROFILE
An Editor Profile screen similar to the example below appears:
11:06:16 ***** NATURAL EDITORS ***** 2010-11-22 - Editor Profile - Profile Name .. SAG_____ PF and PA Keys PF1 ... HELP___________ PF2 ... _______________ PF3 ... EXIT___________ PF4 ... _______________ PF5 ... _______________ PF6 ... _______________ PF7 ... -______________ PF8 ... +______________ PF9 ... _______________ PF10 .. SC=____________ PF11 .. _______________ PF12 .. CANCEL_________ PF13 .. _______________ PF14 .. _______________ PF15 .. MENU___________ PF16 .. _______________ PF17 .. _______________ PF18 .. SCAN___________ PF19 .. --_____________ PF20 .. ++_____________ PF21 .. _______________ PF22 .. _______________ PF23 .. _______________ PF24 .. _______________ PA1 ... _______________ PA2 ... SCAN___________ PA3 ... _______________ Automatic Functions Auto Renumber .. Y Auto Save Numbers .. 0__ Source Save into .. EDITWORK Additional Options .. N Command ===> Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit AddOp Save Reset Del Canc |
The screen displays your own editor profile if an individual profile
exists for your user ID as described for the field
Profile
Name. If such a profile does not exist, the default
profile SYSTEM
is displayed instead. The SYSTEM
profile is read from the user exit routine
USR0070P (see
the Operations documentation).
To invoke a specific editor profile
In the command line of the program editor or data area editor, enter the following:
PROFILE profile-name
where profile-name denotes a valid user
ID or SYSTEM
.
When you are in an editor session and enter the
PROFILE
command together with your own user ID as
profile name, your profile is always invoked directly from the database; any
modifications made during the current editor session, but not yet saved in the
database, will not apply. Therefore, to invoke your current editor profile,
enter the PROFILE
command only.
Caution:
Any changes to the current editor profile are lost when you enter
the LOGON
system command or open another editor
prior to saving the changes to the database.
This section describes the items contained on the Editor Profile screen.
Item | Explanation |
---|---|
Profile Name | The name of the editor profile. Your own editor profile is
displayed. If such a profile does not exist, you can modify the default profile
to suit your own requirements. To do so, overwrite the profile name
SYSTEM with your user ID and save the renamed profile to the
database.
If you overwrite the name of your profile with any other valid profile name (that is, any other valid user ID) and press ENTER, the profile of the corresponding user is invoked. Only one profile can be established per user ID, and any modifications made to another user's profile are only valid for the current editor session; they cannot be saved to the database. You can, however, overwrite the profile name of another user's profile with your own user ID and then save the renamed profile in the database. |
PF and PA Keys | The commands assigned to the PF and PA keys are displayed. Any Natural editor or system command can be assigned. Combinations of commands (separated by a comma) are also possible. |
Auto Renumber | Y indicates that the source code in the program
editor is to be renumbered automatically if any of the following occurs:
Note: |
Auto Save Numbers | If a numeric value is entered, a copy of the current source is
saved automatically into the source object specified in the Source
Save into field after the specified number of modifications have
taken place. Modification means each time that the source has been changed as a
result of information entered on the screen.
Auto Save Numbers applies to the map editor, too. |
Source Save into | The name of the source object into which a copy of the source
is to be saved automatically in the current library. The default name
EDITWORK can be modified. The specified source object is
overwritten each time the number of changes specified in the Auto
Save Numbers field has been exceeded.
|
Additional Options | Y opens a list of additional options described in
the following section.
|
The Additional Options window provides the following:
A plus (+) sign in front of an option indicates that some values have already been set in the corresponding window or with an appropriate editor command.
Enter a Y
to select the required option.
All options are explained in the following section.
Option | Explanation | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Escape Character for Line Command | The escape character which must precede each line command; the default escape character is a period (.). | ||||||||||
Empty Line Suppression |
|
||||||||||
Empty Line Suppression for Text |
|
||||||||||
Source Size Information |
|
||||||||||
Source Status Message |
|
||||||||||
Absolute Mode for SCAN/CHANGE |
|
||||||||||
Range Mode for SCAN/CHANGE |
|
||||||||||
Direction Indicator | Indicates the direction (+ or - ) in
which several editor commands are to work (see also Editor Command
Line in the sections
Program
Editor and Data Area
Editor).
|
Option | Explanation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Editing in Lower Case |
|
||||||||||||||
Dynamic Conversion of Lower Case |
|
||||||||||||||
Position of Message Line | Indicates the position of the message line; possible values are
TOP , BOT ,
nn and
-nn .
|
||||||||||||||
Cursor Position in Command Line |
|
||||||||||||||
Stay on Current Screen |
|
||||||||||||||
Prompt Window for Exit Function |
|
||||||||||||||
ISPF Editor as Program Editor |
|
||||||||||||||
Leave Editor with Unlock |
|
In this window, you can specify the colors in which the various elements of the edit-work and split-screen area of your program or data area editor are to be displayed.
For a list of valid colors and color codes, enter a question mark (?) in any input field or press PF1.
Item | Description |
---|---|
Command Line | Editor command line above the edit-work area. |
Label Indicator | Leftmost column of the editor screen; used, for example, to
label a source code line on which a certain command has been performed (for
example, the .X and .Y
line commands).
|
Line Numbers | Column of the source code line numbers (program editor only). |
Editor Lines | Lines of source code currently in the editing area and/or split-screen area. |
Scan and Error Line | All lines marked with an S (or a greater than
(>) sign in split-screen mode) as a result of a scan operation, any line
where an error was detected (marked with an E and applicable in
the editing area of the program editor only), and the error message line
itself.
|
Information Text | All fields in the information or command line
with general information such as the type of object (for example,
Program ) currently in the editing area.
|
Information Value | All fields in the information or command line with user-specific information such as the name of the object currently in the editing area. |
Information Line | Top and bottom information lines on the editor screen. |
The following direct commands and corresponding PF keys are provided on the Editor Profile screen. A direct command is entered in the command line of the screen.
Command | Description |
---|---|
RESET |
This command (or PF6) resets all
profile parameters to the settings displayed when the Editor
Profile screen was last opened or when the editor profile was last
saved to the database. RESET only applies to the
parameter settings of the current editor profile; the editor profile saved in
the database is not affected by the command.
|
SAVE |
This command (or PF5) saves all
current editor profile settings both for the current editor session and in the
database. SAVE does not terminate the
profile maintenance function.
|
DELETE |
This command (or PF11) deletes the editor profile from the database. Before the profile is deleted, however, a confirmation window pops up, in which you can either type the name of the profile and press ENTER to confirm the deletion of the profile. You can only delete your own editor profile. |
EXIT |
This command (or PF3) terminates the current profile maintenance function, regardless of the setting in the General Defaults window. If any unsaved profile changes exist, you are prompted to save these changes to the database. See also Exit Profile Maintenance. |
CANCEL |
This command (or PF12) cancels the current profile maintenance function and returns to the screen from which it was invoked. Any modifications made to the profile have no effect on the current editor session. |
After modifying the parameter settings of the current editor profile, you can close a profile maintenance window or leave the Editor Profile screen by using one of the following methods:
Press ENTER.
The current maintenance window closes. If no window is open, you return to the command prompt of the program editor or data area editor respectively.
Any modifications are saved for the current editor profile as described for Exit without Saving below.
Or:
Press PF3 (Exit) or enter
EXIT
in the command line of the Editor
Profile screen (if no maintenance window is open).
If no modifications were made to the current editor profile, the current maintenance window closes. If no window is open, you return to the command prompt of the program editor or data area editor respectively.
If you have modified the current editor profile, the EXIT Function window opens. You can then select one of the following options by either positioning the cursor on the required option or entering any character next to the option:
Function | Explanation |
---|---|
Save and Exit | Returns you to the screen from where the current profile
maintenance function was invoked and saves any modifications made to the
current editor profile. Modifications are saved both for the current editor
session and in the database.
If you are working with another user's editor profile, however, modifications made to that profile cannot be saved to the database. They are valid for the current editor session only; a corresponding message is returned. |
Exit without Saving | Returns you to the screen from where the current profile
maintenance function was invoked. Any modifications made to the current editor
profile are only valid for the current editor session; they are not
saved to the database.
Exit without Saving corresponds to pressing ENTER. |
Resume Function | Closes the prompt window and returns you to the current profile maintenance function. |