Each user has an editor profile with parameters which can be set according to individual needs. The first time you invoke the editor, it uses the default settings determined by your administrator.
The options provided to display and modify your default editor profile settings are described in the following section.
To display or hide the current editor profile settings
In the command line of the editor, enter the following:
PROF
(See also the PROF
editor
command.)
The following lines appear at the top of the editing area:
>> -----------Columns 001 072 << Program SAGDEMO Lines 19 User SAG Command ===> Mode Struct Lib SAGTEST ****** ****************************** top of data ***************************** =prof> date: 30/01/08 16:07:57 user: MMO init size: 14 size: 14 =prof> var - 250,..recovery off (100 0)...autosave off... empty line off =prof> mask off.caps on .hex off nulls on std.autoren on std auto order off =prof> log off .mso on .fix off .escape on + . tabs off =prof> advance on .protect off.limit off |
You can hide the display of the profile settings by entering the following in the command line of the editor:
RESET
The profile settings disappear. The current profile settings are retained.
The individual items of the current editor profile and the editor commands that can be used to temporarily change an item (if modifiable) are described in the following section.
You can modify your default editor profile settings for the duration of the current editor session or until you change the settings again.
To change your editor profile settings for the current session
For the profile item you want to change, use the appropriate editor
command listed in the following table. For example, enter CAPS
OFF
if you want the text to be translated into upper case.
The vertical bar used in the syntax of the editor commands separates alternatives. For details on the editor commands listed, refer to Editor Commands.
Profile Item | Description | Editor Command |
---|---|---|
date |
Current date and time.
Non-modifiable item. |
None |
user |
Current logon user.
Non-modifiable item. |
None |
init size |
Number of lines in the source code when the
editor was invoked.
Non-modifiable item. |
None |
size |
Current number of lines in the
source code, excluding information lines (for example profile lines and message
lines).
Non-modifiable item. |
None |
var |
Current line length.
Non-modifiable item. |
None |
autosave |
Activates or deactivates automatic save when the
EXIT
editor command is issued.
|
AUTOSAVE |
empty line |
Specifies whether lines containing only blank characters are to be deleted automatically. | EMPTY ON|OFF
|
mask |
Activates or deactivates the mask line function. | MASK ON|OFF
|
caps |
Specifies whether text is to be translated into upper case. | CAPS ON|OFF|PGM
|
hex |
Specifies whether characters are to be displayed in hexadecimal format. | HEX ON|OFF
|
autoren |
Specifies that automatic renumbering of source
lines is activated.
Non-modifiable item. |
None |
auto order |
Automatically justifies text within defined boundaries. | AORDER ON|OFF
|
log |
Enables or disables the log file. When enabled,
the UNDO editor
command can be used to backout last changes.
|
LOG ON|OFF
|
mso |
Indicates that multiple-session operations are
allowed. A multiple-session operation is an operation in which data is
exchanged between two editing sessions, for example, when copying text from one
object to another in split-screen
mode.
Non-modifiable item. |
None |
fix |
Specifies whether a fixed number of columns is displayed and how many columns are to be fixed. | FIX ON|OFF
n |
tabs |
Activates or deactivates tabulation. | TABS
ON|OFF |
advance |
Specifies whether the cursor moves to the next line automatically after a line update. | ADVANCE
ON|OFF|PAGE |
protect |
Specifies protection of line numbers. | PROTECT ON|OFF|INS |
limit |
Specifies the maximum number of lines to be
searched by a FIND or
RFIND
editor command.
|
LIMIT
n |
You can use the profile facility of the program editor to change your profile settings not only for the current session as described earlier, but also for future editor sessions. Settings modified with the editor profile facility are valid for each new Natural session or until you change them again. These settings can be overridden for the duration of the current session by using the editor commands described in Modifying Profile Settings for Temporary Use.
To modify your editor profile settings for permanent use
In the command line of the program editor, enter the following:
PROFILE
The Main Menu of the program editor profile facility appears with the following options:
Option | Function |
---|---|
Saves the current profile. | |
Invokes input screens for modifying the default settings for PA/PF keys and editor commands: see Modifying Editor Default Settings. | |
Reads the editor profile of another user which you specify in the Profile Name field. The settings from the external profile can then be saved under your profile name. | |
Displays information on the object currently being edited and the system environment: see Displaying Technical Information. |
This section covers the following topics:
The direct commands and alternative PF keys available in the editor profile facility are described in the following section. You enter a direct command in the command line (Command ===>) at the bottom of the editor profile screen.
Command | PF Key | Function |
---|---|---|
CANCEL |
PF12 | Cancels the current modification and displays the previous screens. Any modifications made to the profile have no effect for the current session. |
EXIT |
PF3 | Leaves the current screen and either returns to the previous screen or invokes the EXIT Function prompt window (see also Exit Function). |
FLIP |
None | Toggles between PF1 - PF12 and PF13 - PF24. |
READ |
PF6 | Reads the profile parameters for the user ID currently contained in the Profile Name field. Any modifications made so far, but not yet saved, are overwritten (valid only for the Main Menu). |
SAVE |
PF5 | Saves all currently valid profile parameters both for the current session and on the database. However, it does not leave the current function (valid only for the Main Menu). |
If you select Main Menu or press PF4, the Modify Defaults screen is displayed with the following options:
from theOption | Function |
---|---|
Modifies the PA/PF-key assignments: see Displaying and Modifying PA/PF-Key Assignments. | |
Modifies the command defaults: see Modifying Command Defaults. | |
Modifies the parameter settings of the
FIND command: see
Modifying FIND
Command Defaults.
|
|
Enables or disables the EXIT Function prompt window and modifies the number of lines displayed before error line: see Modifying General Defaults. |
If you select PA/PF-Keys from the Main Menu or press PF2, the Modify PF/PA-Keys screen is displayed with the current PA/PF-key assignments. To modify a PF-key assignment, replace the name of an existing command (editor command, system command or program name) by another command (maximum five characters).
To modify a PA-key or PF-key assignment
In the input field next to the required PA or PF key, enter the name of a valid editor or system command, or an existing program. You can enter a maximum of five characters.
The default PA/PF-key assignments for the editor are:
PF Key | Command | Function |
---|---|---|
PF1 | HELP |
Invokes the Natural online help facility. |
PF2 | SAVE |
Executes the system command
SAVE which saves the source code currently in the
source work area as a source object in the current library in the current
system file. See also Saving and
Cataloging Sources.
|
PF3 | EXIT |
Exits the editor. See also Exit Function. |
PF4 | RUN |
Checks and runs the program in the editing area. |
PF5 | RFIND |
Repeats the last
FIND
command.
|
PF6 | STOW |
Executes the system command
STOW which saves and catalogs the source code
currently in the source work area. See also
Saving and Cataloging
Sources.
|
PF7 | UP
or - |
Scrolls upwards. |
PF8 | DOWN
or + |
Scrolls downwards. |
PF9 | CHECK |
Checks whether the source code currently in the source work area contains any syntax errors. |
PF10 | HOME |
Places the cursor in the command line. |
PF11 | UNDO |
Backs out the last change made to the source. |
PF12 | CANCEL |
Exits the editor. See also Exit Function. |
PF13 | PROFILE |
Invokes the editor profile facility. |
PF14 | RESET |
Resets all pending editor and line commands and deletes all line labels. |
PF15 | SWAP |
Toggles the cursor between the upper and lower half of a split screen if split-screen mode is set. |
PF16 | LAST |
Executes the system command
LAST
(see the System Commands documentation) which recalls the
last command issued and places it in the command line.
|
PF17 | RCHANGE |
Repeats the last
CHANGE editor
command.
|
PF18 | FLIP |
Toggles the PF-key display between PF1 - PF12 and PF13 - PF24. |
PF19 | TOP
or -- |
Scrolls to the beginning of the source. |
PF20 | BOTTOM
or ++ |
Scrolls to the end of the source. |
To modify a PF-key assignment, replace the name of an existing command (editor command, system command or program name) by another command (maximum five characters).
If you select PF5, you can enable or disable selected editor commands and specify default characters for editor commands. The input fields contained on the screen are explained in the table below. For more information on a specific field, enter a question mark (?) in the field and press ENTER.
from the or pressField | Description |
---|---|
aorder | Enables or disables the autoorder function. |
autosave | Enables or disables the autosave function. |
caps | Specifies whether text is to be translated into upper case. |
cols | Specifies whether a line is to be displayed that shows the current column positions. |
decimal character | Specifies the character used to mark decimal
positions in numbers used in tabs. See also
Example 3 - TABS
DECIMAL of the TABS editor
command.
|
empty | Specifies whether lines containing only blank characters are to be deleted automatically. |
fix | Specifies whether the number of columns entered in fixlen (see below) remain in display when scrolling to the right. |
fixlen | Only applies if fix (see
above) is set to ON .
Specifies the number of columns starting with column 1 to remain in display when scrolling to the right. |
hex | Specifies whether characters are to be displayed in hexadecimal format. |
justify | Enables or disables justification or specifies the justification type. |
limit | Specifies the maximum number of lines to be
searched by FIND or
RFIND
editor command.
|
log | Enables or disables the log file. When enabled,
the UNDO editor
command can be used to back out the last change.
|
mask line | Enables or disables the mask line function. |
message line | Enables or disables message output. |
mso | Indicates that multiple-session operations are allowed such as copying between split-screen sessions. Non-modifiable item. |
scroll mode | Specifies how scrolling is to be performed (whole page, half page, to cursor). |
tabs | Enables or disables tabulation. |
tabulator character | Specifies the logical tabulation character used to automatically move input to a specific tab position. |
If you select PF8, a screen is displayed with the current
parameter settings. These settings are used whenever you issue the
FIND
editor command without parameters from the command line of the program editor.
You can modify these values in a window before the search is performed.
The following parameters can be modified:
Parameter | Function |
---|---|
FIND string | Specifies the string to be searched for. |
search from/to col | Specifies the start and end numbers of the range of columns to be searched. |
search from/to label | Specifies the start and end labels of the marked block of lines to be searched. |
If you select
from the , a screen is displayed with the current defaults. You can modify these settings as required. A short description of each setting follows:Option | Function |
---|---|
Prompt Window for Exit Function | Specifies whether a prompt window is to appear when leaving the program editor with the exit function (see the relevant section). |
Prompt Window for Cancel Function | Specifies whether a prompt window is to appear when leaving the program editor with the cancel function. See also Exit Function. |
Lines displayed before error line | Specifies the number of lines to be displayed at
the top of the page preceding the line containing a syntax error. If you
specify 0 (zero), the line containing the syntax error is placed
in the first line of the editing area.
|
If you select PF7, a screen is displayed with information about the object currently being edited and the computing environment. The following items are provided:
from the or pressItem | Description |
---|---|
User ID | ID of the current user. |
Current library | Name of the library to which you are currently logged on. |
Current program | Name of the object currently in the editing area. |
Current type | Type of object (for example, program) currently in the editing area. |
Object type | Internal type code of the current object. |
Mode | Programming mode (see also Mode). |
Operating system | Name of the operating system installed. |
Steplib | Name of the library concatenated with the current library. |