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 wish to edit:
Programs, subprograms, subroutines, helproutines, classes, copycode and text objects 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).
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 (for further information, see Installing the Software AG Editor in the Installation documentation and the section Software AG Editor). If you wish to use the Software AG Editor as an alternative to the Natural program editor, Natural ISPF must be installed.
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.
Command | Function |
---|---|
SPLIT
++ |
Position to bottom of object. |
SPLIT
B |
|
SPLIT
-- |
Position to top of object. |
SPLIT
T |
|
SPLIT
+ |
Position one page forwards. |
SPLIT
+P |
|
SPLIT
- |
Position one page backwards. |
SPLIT
-P |
|
SPLIT
+nnn |
Position nnn lines forwards (only valid for program editor). |
SPLIT
-nnn |
Position nnn lines backwards (only valid for program editor). |
SPLIT .
or
|
Terminate split-screen mode. |
SPLIT
DATA name
[library] |
Display data area (global, local, parameter). |
SPLIT
DESCRIPTION pgm-name
[library] |
Display program description (if available) from the Predict Data Dictionary (valid for program and data area editor only). |
SPLIT
FUNCTION name
[library] |
Display the subroutine name, where
name is the name of the subroutine as used in the
DEFINE SUBROUTINE statement (not the name of the object containing
the subroutine). This command is only available in the program editor.
|
SPLIT
PROGRAM name
[library] |
Display program, subprogram, subroutine, helproutine, copycode, text, map, class, Natural command processor, recording, adapter, dialog, function or resource. |
SPLIT
SCAN [value] |
Scan for a value. Each line
containing the value is marked with a greater than (>) sign. To further scan
for the same value, enter S SC only.
|
SPLIT
VIEW name
[SHORT] |
Display view (DDM, as defined in Predict or SYSDDM). If
SHORT is specified, the DDM is listed in short form (that is, only
the Adabas short names and corresponding Natural field names are displayed)
without any field header or field edit mask information.
|
In the data area editor, with DATA
, PROGRAM
and VIEW
, an asterisk (*) can be used for
name to display a list of all available objects. If
the asterisk (*) is preceded by one or more characters, only those objects
whose names begin with these characters are displayed.
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 edit session, such as 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:
10:36:42 ***** NATURAL EDITORS ***** 2007-09-27 - Editor Profile - Profile Name .. SAG_____ PF and PA Keys PF1 ... --_____________ PF2 ... -H_____________ PF3 ... -______________ PF4 ... ++_____________ PF5 ... +H_____________ PF6 ... +______________ PF7 ... SCAN___________ PF8 ... _______________ PF9 ... _______________ PF10 .. SC=____________ PF11 .. *CURSOR________ PF12 .. CANCEL_________ PF13 .. _______________ PF14 .. _______________ PF15 .. _______________ PF16 .. _______________ PF17 .. _______________ PF18 .. _______________ PF19 .. _______________ PF20 .. _______________ PF21 .. _______________ PF22 .. _______________ PF23 .. _______________ PF24 .. _______________ PA1 ... _______________ PA2 ... _______________ PA3 ... _______________ Automatic Functions Auto Renumber .. Y Auto Save Numbers .. 10_ 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 Flip 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 edit 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 session, but not yet saved on the
database, will not apply. Therefore, to invoke your current session profile,
enter the PROFILE
command only.
Caution:
Profile modifications made during the current session are lost
when you enter the system command LOGON
.
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 on 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 session; they cannot be saved on 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 on 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 | See below. |
If you mark Additional Options on the
Editor Profile screen with a Y
or press
PF4, a window will be displayed from which you can select the
following options:
A plus (+) sign in front of an option indicates that some values have already been set in the corresponding window or via an appropriate editor command.
To select an option, you mark it with a Y
.
For each option selected, a corresponding window will be displayed. The individual items of each window are explained below.
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 |
|
If you mark Color Definitions with a
Y
in the ADDITIONAL OPTIONS window, a window
similar to the example below appears:
+----------------------COLOUR DEFINITIONS-----------------------+ ! ! ! Edit Work Area Split Screen Area ! ! Command Line ........ NE ! ! Label Indicator ..... NE Label Indicator .... NE ! ! Line Numbers ........ NE Line Numbers ....... NE ! ! Editor Lines ........ NE Editor Lines ....... NE ! ! Scan and Error Line.. NE Scan Line .......... NE ! ! Information Text .... NE Information Text ... NE ! ! Information Value ... NE Information Value .. NE ! ! Information Line .... NE ! +---------------------------------------------------------------+ |
In this window you can specify the colors in which the various parts of the edit-work and split-screen area of your program or data area editor are to be displayed.
To get a list of the colors available, you enter the question mark (?) help character in any of the input fields or press PF1 (Help).
Apart from the Command Line and Information Line and the corresponding Information Text and Information Value, the following individual parts can be assigned a specific color:
Item | Description |
---|---|
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 edit-work 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
edit-work area of program editor only) and the error message line
itself.
|
The following direct commands can be used instead of the corresponding PF keys. Direct commands have to be entered in the command line at the bottom of the editor profile screen.
Command | Description |
---|---|
CANCEL |
This command (or PF12) cancels the current function and returns you to the screen from which it was invoked. Any modifications made to the profile have no effect for the current session. |
DELETE |
This command (or PF11) deletes the current 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, or press ENTER only to exit the function. |
EXIT |
This command (or PF3) invokes the exit function prompt window, regardless of whether the corresponding editor default parameter (see General Defaults) is set or not. |
FLIP |
This command (or PF6 and PF18) is used to switch between the two PF-key lines. |
REFRESH |
This command (or PF13) displays the profile parameters currently valid for the session, which means that any modifications made so far, but not yet saved, are overwritten. |
SAVE |
This command (or PF5) saves all currently valid profile parameters both for the current session and on the database. However, it does not leave the current function. |
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 maintenance window currently open is closed. 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).
The EXIT Function window opens where you can select one of the following three options. Select one of them by either positioning the cursor or entering any character.
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 session
and on the database.
If you are working with another user's editor profile, however, modifications made to that profile cannot be saved on the database. They are valid for the current 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 session; they are not saved on
the database.
Exit without Saving corresponds to pressing ENTER. |
Resume Function | Closes the prompt window and returns you to the current profile maintenance function. |