Version 4.2.6 for Mainframes (Update)
 —  Editors  —

Editors - General Information

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:

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:


Split-Screen Mode

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.

Example:

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

Split-Screen Commands

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

SPLIT END

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.

Top of page

Editor Profile

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:

Invoking the Editor Profile

Start of instruction setTo invoke your current editor profile

Start of instruction setTo invoke a specific editor profile

Caution:
Profile modifications made during the current session are lost when you enter the system command LOGON.

Editor Profile Screen

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:
  • A CATALOG, CHECK, RUN, SAVE or STOW command is issued.

  • A .I line command is issued and no line number is available for the line to be inserted.

Note:
See also Renumbering of Source-Code Line Number References in the Programming Guide.

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.

Additional Options

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.

Editor Defaults

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
This option applies when inserting lines into the source of an object (except text objects) by using the line command .I as described in Program Editor and Data Area Editor. Possible option settings:
 
Y Any lines left blank are removed from the source as soon as you press ENTER. This is the default setting.
   
N   Any lines left blank are not removed from the source when you press ENTER.
Empty Line Suppression for Text
This option applies when inserting lines into the source of a text object by using the line command .I as described in Program Editor. Possible option settings:
 
Y Any lines left blank are removed from the source as soon as you press ENTER.
 
N Any lines left blank are not removed from the source when you press ENTER. This is the default setting.
Source Size Information
Y The actual size of the object being edited and the remaining space available is displayed in the bottom information line of the editor screen. In addition, in the program editor, the programming mode (reporting or structured) is displayed in the top information line of the editor screen.
   
N   No such information is displayed.
Source Status Message
Y Program editor:
A transaction message is displayed in the top information line each time the source is modified, checked, saved, cataloged or stowed. In addition, an asterisk (*) is displayed in the editor command line if the source contains unsaved modifications. For details, see Modification Indicator in the Program Editor documentation.

Data area editor:
An asterisk (*) is displayed in the top information line if the source contains unsaved modifications. For details, see Modification Indicator in the Data Area Editor documentation.

   
N   No transaction message and/or asterisk (*) is displayed.
 
Absolute Mode for SCAN/CHANGE
Y Corresponds to the editor command SET ABS ON.
   
N   Corresponds to the editor command SET ABS OFF.
 
See Editor Commands in the sections Program Editor and Data Area Editor.
Range Mode for SCAN/CHANGE
Y Corresponds to the editor command SET RANGE ON
   
N   Corresponds to the editor command SET RANGE OFF.
 
See Editor Commands in the section Program Editor.
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).

General Defaults

Option Explanation
Editing in Lower Case
Y   Lower-case characters in the source code are not automatically converted to upper case.
   
N Lower-case characters in the source code are automatically converted to upper case. Automatic conversion is in effect by default.
   

Caution:
Do not use the terminal commands %L or %U within the editor.

Dynamic Conversion of Lower Case
This option is relevant only if the above option is set to Y.
   
Y All lower-case characters in the source code are automatically converted to upper case - except text strings that are enclosed in apostrophes and comments: these remain as you enter them (see also the section Program Editor).
   
N   Any source code remains as you enter it.
Position of Message Line Indicates the position of the message line; possible values are TOP, BOT, nn and -nn.
Cursor Position in Command Line
Y   Indicates that the cursor is positioned in the edit command line after the source has been modified and you pressed ENTER.
Stay on Current Screen
Determines whether the current screen stays when you press ENTER.
   
Y   Corresponds to the editor command SET STAY ON.
   
N Corresponds to the editor command SET STAY OFF.
 
See Editor Commands in the sections Program Editor and Data Area Editor.
Prompt Window for Exit Function
Y   When you enter the EXIT command in the editor command line, a confirmation window is displayed (see also Exit Function in the sections Program Editor and Data Area Editor).
ISPF Editor as Program Editor
Y Natural ISPF (if installed) is invoked instead of the Natural program editor.
Leave Editor with Unlock
Y   Unlocks source code when leaving the editor.
   
N Leaves the editor (default setting).
   
C Unlocks source code and clears the source work area when leaving the editor.
 
For more information on locking, see the section Locking of Source Objects.

Color Definitions

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.

Direct Commands

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.

Exit Profile Maintenance

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:

Top of page