You are on page 1of 22

� Software AG, Gmbh

==============================================================================
------------------------------------------------------------------------------
09:33:27 ***** NATURAL HELP UTILITY ***** 2009-10-06
- Natural Editors -
------------------------------------------------------------------------------
==============================================================================

Code Function

O Overview
S Split-Screen Mode
E Editor Profile
P Program Editor
D Data Area Editor
M Map Editor

==============================================================================
- Natural Editors -
- Editors: Overview -
==============================================================================

To edit Natural objects invoke a Natural editor with the system command EDIT.
Which editor is invoked depends on the type of object edited:

- Programs, subprograms, subroutines, helproutines, copycodes, text and


classes 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' (as


described in the Predict documentattion).

All three Natural editors can be used in split screen mode, that is, the
first half of the screen can be used for editing an object and at the same
time another object can be displayed on the other half.

For further information, see chapter 'Split Screen Mode'.

==============================================================================
- Natural Editors -
- Editors: Split-Screen Mode -
==============================================================================
Command Function (split-screen mode)
--------------------- --------------------------------------------------------

S ++ or S B Position to bottom of object.

S -- or S T Position to top of object.

S + or S +P Position one page forwards.

S - or S -P Position one page backwards.


S +nnn or S -nnn Position nnn lines forwards or backwards (only valid for
program editor).
S DATA name <library> Display data area (global, local, parameter)

S DESC pgm-name <library> Display program description, if available from


the Predict Data Dictionary.

S FUNCTION name <library> Display subroutine 'name' ('name' is the subroutine


name); only available in the program editor.

S PROGRAM name <library> Display program, subprogram, subroutine,


helproutine, copycode, text, map, class.

S SCAN <value> Scan for 'value' and mark line with a '>'. To further
scan for the same scan, enter "S SC" only.

S VIEW name <SHORT> Display view (DDM, as defined in Predict or SYSDDM).


SHORT listed the DDM in short form.

S . or S END Terminate split-screen mode.

==============================================================================
- Natural Editors -
- Editor Profile -
==============================================================================

When working with the Natural program editor or the Natural data area editor,
an EDITOR PROFILE can be defined by user.

The editor profile contains the definitions for PF and PA keys and various
other settings to be in effect during the edit session. The editor profile
can be modified by the users to suit their personnel editing requirements.

The "PROFILE" command activates the current profile.

The "PROFILE profile-name" command displays a specific profile.

Editor Profile Explanation


-------------------- --------------------------------------------------------
Profile Name Name of the editor profile (if one exits, your profile
is displayed, if not, the default profile "SYSTEM" is
displayed). Any other valid PROFILE NAME can also be
entered. However, any modification you make to another
user's profile, is only valid for the current session.

PF and PA Keys Definitions for PF and PA keys. Any Natural editor or


system command, or combination of commands (separated
by commas) may be used.

Auto Renumber Indicates that the source is to be renumbered automa-


tically if a CATALOG, CHECK, RUN, SAVE, or STOW command,
or if a ".I" line command has been issued.
Auto Save Numbers Copy of the source is saved automatically into member
specified in SOURCE SAVE INTO after specified number of
modifications have occurred.

Source Save into Name of member into which the copy of the source is to
be saved. Default member name EDITWORK can be modified.
ADDITIONAL OPTIONS "Y" displays a window where three additional options
can be invoked:
- EDITOR DEFAULTS
- GENERAL DEFAULTS
- COLOUR DEFINITIONS
EDITOR DEFAULTS "Y" displays the EDITOR DEFAULTS window with the
following parameters:

Escape Character The escape character which must precede each line
for Line Command command; default character is ".".

Empty Line "Y" indicates that any line left blank should be
Suppression eliminated from the source as soon as pressed ENTER.

Source Size "Y" displays the actual size of the current object and
Information the remaining space available. In program editor, also
the current programming mode is displayed.

Source Status "Y" indicates that a transaction message is to be


Message displayed each time the source is modified, checked,
saved, cataloged, or stowed.

Absolute Mode for "Y" indicates that the SCAN and CHANGE commands operate
SCAN/CHANGE in absolute mode,i.e., the value to be scanned/changed
need not be delimited by blanks or special characters.

Range Mode for "Y" indicates that the SCAN and CHANGE commands operate
SCAN/CHANGE in range mode,i.e., the value to be scanned/changed must
be located within the range of lines delimited by the
X and Y line markers.

Direction Indicator "+" ("after") and "-" ("before") control the direction
of several editor commands.

GENERAL DEFAULTS "Y" displays the GENERAL DEFAULTS window with the
following parameters:

Editing in "Y" prevents that the lower-case characters are


Lower Case translated to upper-case. "N" translates the lower-case
characters to upper-case.

Dynamic Conversion "Y" converts the source code to upper-case, except for
of Lower Case textstrings that are enclosed in apostrophes and comment
(only relevant if Editing in Lower Case is set "Y").
Position of "TOP", "BOT" or a message line number can be specified
Message Line for the message line position in the editor.

Cursor Position "Y" indicates that the cursor is positioned in the edit
in Command Line command line each time the source has been modified.

Stay on "Y" indicates that the current screen will stay when
Current Screen the ENTER key is pressed. Forward/backward positioning
can be done by commands only. "N" indicates that using
the ENTER key positions to the next screen.

Prompt Window for "Y" indicates that a window is displayed as soon as you
Exit Function enter the EXIT command, where you can save the edited
source on the database and leave the editor, leave the
editor without any saving, or stay in the editor.

ISPF Editor as "Y" indicates that Natural ISPF is invoked instead of


Program Editor the Natural program editor. "N" indicates that the
Natural program editor is used (default).

COLOUR DEFINITIONS "Y" displays the COLOUR DEFINITIONS window in which the
colours for various parts of the editor can be specified
(enter '?' to help for colour code).
CANCEL Cancels the current function and returns to the previous
screen (same as PF12).
DELETE Deletes the PROFILE from the database. Before deletion,
you are prompted for confirmation (same as PF11).
EXIT Invokes the exit function window (same as PF3).
FLIP Switches between the two PF-key lines (same as PF6/PF18)
REFRESH Displays the profile parameters currently valid (same
as PF13).
SAVE Saves all currently valid profile parameters on the
database, but does not leave the current function (same
as PF5).

==============================================================================
- Natural Editors -
- Natural Program Editor -
==============================================================================

Code Function

C Command Line
E Edit Commands
L Line Commands
K Special PF-Key Functions
S Cursor-Sensitive Commands

------------------------------------------------------------------------------
- Natural Editors -
- Program Editor: Command Line -
------------------------------------------------------------------------------
The Program Editor command line appears as:

> edit-commands > + Program NAME Lib LIBRARY

EDIT COMMAND is entered between > and >; parameters must be separated by
blanks or input delimiter character.

Direction indicator controls direction of ADD, SCAN, .C, .M, and .I commands;
(+ indicates after, and - indicates before).

Object type, object name, and current library name appear on the command line.
------------------------------------------------------------------------------
- Natural Editors -
- Natural Program Editor: Edit Commands -
------------------------------------------------------------------------------
Edit Command Function
---------------- -------------------------------------------------------------
ADD n Add up to 9 blank lines on screen (if direction indicator
is +, lines are placed after last line, if direction indica-
tor is -, lines are placed before first line). Lines left
blank are deleted when ENTER is pressed.

CANCEL Leaves the editor without saving the source code.

CHANGE Scan for 'scandata' and replace with 'replacedata'. Syntax


is: CHANGE 'scandata'replacedata'

CLEAR Clear the edit source work area.

DX, DY, DX-Y Delete X-marked line, Y-marked line, or a block of lines
delimited by X and Y.

EX, EY, EX-Y Delete source lines from top down to (not including) X-marked
line; from line following Y-marked line down to bottom; or
all lines excluding block delimited by X and Y.

EXIT Leave the editor with saving the source code. If the EXIT
flag is set in the profile, the EXIT function window appears.
You can use exit with or without save or resume in the editor

LET If entered as first edit command, only edit commands will be


executed (line commands and line changes will be ignored).
N Renumber program currently in source work area.

PROFILE name Display current editor profile.

QUIT Same as edit command CANCEL.

REN ON/OFF ON Renumbers Natural source program whenever it is checked,


run, saved, stowed or cataloged (default).
OFF Automatic renumbering is not in effect.

RESET Delete X and/or Y line markers, and marker set with .N line
command.

SCAN 'scanvalue' Scan for 'scanvalue'. If only SCAN is used, the SCAN window
appears. The lines in which the scan value is located is
marked with "S" to left of the line.
SCAN= +/- Scans for the next occurrence of the scan value, also the
direction can be determined.

SET ABS ON/OFF ON SCAN and CHANGE operate in absolute mode,i.e. the value
need not be delimited by blanks or special characters.
OFF Operate in non-absolute mode, i.e. the value must be
delimited by blanks or special characters (default).

SET ESCAPE char Escape character which must precede each line command.
Default is '.'
SET NUL ON/OFF ON Value scanned with SCAN is to be deleted. After deletion
the NUL value is OFF (default).

SET RANGE ON/OFF ON SCAN and CHANGE operate only within the range of lines
delimited by X and Y line markers. Default is OFF.
SET SIZE ON/OFF ON Program size displayed at bottom of editor screen.
Default is OFF.

SET STAY ON/OFF ON Current screen remains when ENTER key is pressed.
(Forward/backward positioning with edit commands only.)
OFF Positioning to next screen with ENTER key (default).

SET TYPE type Change type of object to be edited. Type may be PROGRAM,
SUBROUTINE, SUBPROGRAM, HELPROUTINE, COPYCODE, TEXT or CLASS.

SHIFT -nn/+nn Shift source lines delimited by X and Y markers nn positions


to the left or right; comment lines are not shifted.
SHIFT --/++ Shift source lines delimited by X and Y markers to the
leftmost / rightmost (max. 99 ) positions.
Comment lines are not shifted.

STRUCT Perform structural indentation of Natural source statements


and identify structural inconsistencies.

STRUCT DISPLAY The Natural source program is displayed in compressed form


(see STRUCT system command).

* Display edit command most recently entered.

*= Execute last command entered in command line.

'.' Same as edit command CANCEL.

Edit Command for


Positioning Function
---------------- -------------------------------------------------------------
+P, +, -P, - Position forwards (+) or backwards (-) one page.

+H, -H Position forwards or backwards half a page.

T, --, B, ++ Position to top (--) or bottom (++) of program.

+nnnn, -nnnn Position forwards or backwards 'nnnn' lines.


nnnn Position to line 'nnnn'.

X, Y Position to line marked with "X" or "Y".

POINT Position line in which .N was entered to top of editor screen


------------------------------------------------------------------------------
- Natural Editors -
- Program Editor: Line Commands -
------------------------------------------------------------------------------
Line Command Function (Note: Repetition factor (nn) is optional)
---------------- ------------------------------------------------------------
.C(nn) Copy line in which command is entered.

.CX(nn) .CY(nn) Copy X-marked line or Y-marked line.

.CX-Y(nn) Copy block of lines delimited by X and Y markers.

.D(nn) Delete line(s) in which command is entered. Default is 1.

.I(n) Insert (n) lines. Default is 9(max), 4 in split screen mode.


.C(nn) Copy line in which command is entered.

.CX(nn) .CY(nn) Copy X-marked line or Y-marked line.

.CX-Y(nn) Copy block of lines delimited by X and Y markers.

.D(nn) Delete line(s) in which command is entered. Default is 1.

.I(n) Insert (n) lines. Default is 9(max), 4 in split screen mode.

.I(obj,ssss,nnnn) Insert object from current library or library 'SYSTEM' into


the source. 'ssss' is 1st line to be inserted (i.e. if in-
sertion is to begin with 39th line, ssss is '39') and 'nnnn
is number of lines to be inserted. - This command is always
executed after all other edit/line commands. If a map is
inserted, INPUT USING MAP is included in current line. If
data area (cataloged) is inserted, DEFINE DATA is included
in current line.

.J Join current line with next line.

.L Cause contents of line to remain unchanged.

.MX .MY Move X-marked or Y-marked line.

.MX-Y Move block of lines delimited by X and Y markers.

.N Mark invisibly a line for POINT command.

.P Position line in which command is entered to top of screen.

.S Split line at position marked by cursor.


.X Indicate beginning of block of lines to be processed.

.Y Indicate end of block of lines to be processed.

Note: Line commands must be entered beginning in position 1 of a source line.

Note: If direction indicator is +, lines are placed after line in which


command is entered. If direction indicator is -, lines are placed before
the line in which command is entered.
EXAMPLE: RESULT:
0100 .I(2)E DATA LOCAL Two lines will be inserted after the
0110 USING LDA01 DEFINE DATA LOCAL statement.
0120 END-DEFINE
------------------------------------------------------------------------------
- Natural Editors -
- Program Editor: Special PF-Key Functions -
------------------------------------------------------------------------------
Function Explanation
--------------- -----------------------------------------------------------
*CURSOR A line split function can be combined with command '.I',
'.CX', '.CX-Y', '.MX', or '.MX-Y', if value *CURSOR is
defined to a PF-key. If PF-key is used after a line command
is entered, line in which command is entered is split at
cursor position, then line command is executed.
*X *Y If a PF-key is assigned value *X or *Y, the appropriate
line/column will be marked X or Y whenever PF-key is used.
Cursor position indicates location of marker. Markers are
used to determine which portion of line is to be included
in command operation.
See next page for example.

Example for PF-key functions '*X *Y'

Program excerpt: Resulting program excerpt:

XY 0010 MOVE
X 0010 MOVE A TO B 0030 TO A
0020 WRITE A B ....
Y 0030 MOVE B TO A 0100 ....
XY 0010 A TO B
.... 0020 WRITE A B
0100 .MX-Y 0030 MOVE B

The block of text was moved, starting with the 'A' on line 0010 and ending
with the 'B' on line 0030; it was inserted after the line in which line
command '.MX-Y' was entered.
------------------------------------------------------------------------------
- Natural Editors -
- Program Editor: Cursor-Sensitive Commands -
------------------------------------------------------------------------------

Cursor-sensitive commands are commands where, instead of entering a name in


the command line, mark a name with the cursor anywhere on the editor screen.

Edit command used as cursor-sensitive commands are:


- SCAN and SPLIT SCAN
- SPLIT
- EDIT and LIST

Note: It is useful to assign the SCAN or SPLIT SCAN command to a PF-key.


==============================================================================
- Natural Editors -
- Natural Data Area Editor -
==============================================================================

Code Function

F Editor Fields
E Edit Commands
L Line Commands

------------------------------------------------------------------------------
- Natural Editors -
- Data Area Editor: Editor Fields -
------------------------------------------------------------------------------
Field Explanation
------------ -----------------------------------------------------------------
I Indicator (not modifiable by user):
E Definition error has been detected.
A Array bounds have been defined via '.E' line command.
I Initial value has been defined via '.E' line command.
M Edit mask has been defined via '.E' line command.
S Both initial value and edit mask have been defined.
+ More than one entry has been defined using '.E' command.

Only available in parameter data areas:


blank Call by REFERENCE has been defined (default).
V Call by VALUE has been defined.
R Call by VALUE RESULT has been defined.
O Parameter specification OPTIONAL has been defined.

T Type:
B Data block
C Constant or counter variable in views
G Group (within a view only)
M Multiple-value field
O Handle of object
P Periodic group
R Redefinition
U Globally Unique Identifier (GUID)
V View
* Comment
blank Elementary field

L Level: Level numbers (1-99)


Variables not within hierarchical structure or view definitions
must be assigned level 1.
Level numbers cannot be used with data block definitions.

Name Name of variable, block, view,


or filler option nX (with n up to 10 digits, but <1GB).

F Format of variable (any supported by Natural)

Length Length of variable


Enter DYNAMIC for dynamic variables of format A and B.
Length is not permitted for the formats C, D, T and L.
Miscellaneous Define an array, e.g. (2,2),
supply initial values for a variable, e.g. INIT<3>,
supply the edit mask for a variable, e.g. (EM=999.99),
supply with the edit mask also field header or print mode,
enter the name of a DDM for a view definition,
enter the name of the parent block for a block definition, or
enter a comment.

------------------------------------------------------------------------------
- Natural Editors -
- Data Area Editor: Edit Commands -
------------------------------------------------------------------------------
Edit Command Function
------------------ -----------------------------------------------------------
CATALOG data-area Catalog the data area definition currently in the editor.

CHECK Check data area definition; causes entries INDEX/INIT...


to be ordered in sequence shown on editor screen.

CLEAR Clear edit source area.


DX, DY, DX-Y Delete X-marked line, Y-marked line, or a block of lines
delimited by X and Y.

EX, EY, EX-Y Delete source lines from top down to (not including)
X-marked line; from line following Y-marked line down to
bottom; or all lines excluding block delimited by X and Y.
CATALOG data-area Catalog the data area definition currently in the editor.

CHECK Check data area definition; causes entries INDEX/INIT...


to be ordered in sequence shown on editor screen.

CLEAR Clear edit source area.

DX, DY, DX-Y Delete X-marked line, Y-marked line, or a block of lines
delimited by X and Y.

EX, EY, EX-Y Delete source lines from top down to (not including)
X-marked line; from line following Y-marked line down to
bottom; or all lines excluding block delimited by X and Y.
EXIT Leave the data area editor.

GENERATE obj-name Generate copycode using current data area definitions,


including DEFINE DATA LOCAL statement.

M +/- Shift right/left the contents of the Miscellaneous field.

PROFILE name Read/display/save user specific editor profile.

READ data-area Read existing data area definition into edit area.

SAVE data-area Save data area currently in edit source area.


(Definition is not checked prior to being saved.)
SET ABS ON/OFF ON SCAN and CHANGE operate in absolute mode,i.e. the
value need not be delimited by blanks or special chars
OFF Operate in non-absolute mode (default).

SET PREFIX abc Add prefix abc to every entered/modified variable name.

SET PREFIX OFF Turn prefix setting off.

SET SCAN Set SCAN for a value scanned in the COMMENT column or in
COMMENT/NAME the NAME column.

SET SIZE ON/OFF ON Program size displayed at bottom of editor screen.


Default is OFF.

SET STAY ON/OFF ON Current screen remains when ENTER used (forward/
backward positioning with commands).
OFF Position to next screen.

SET TYPE type Set object type to: G (global), L (local), P (parameter).

STOW data-area Save and catalog data area definition currently in edit
area; definition is checked prior to being cataloged.

------------------------------------------------------------------------------
- Natural Editors -
- Data Area Editor: Line Commands -
------------------------------------------------------------------------------
Line Command Function
---------------- ------------------------------------------------------------
.C Copy line in which command is entered.
.CX .CY Copy X-marked line or Y-marked line.
.CX-Y Copy block of lines delimited by X and Y markers.

.D Delete line in which command is entered. If part of a


hierarchical structure, whole part will be deleted.
.D(nnnn) Delete nnnn lines,regardless of any hierarchical structure.

.E Invoke separate screen for definition of initial values,


edit masks, parameter types (for PDAs only) and array
indexes.
If entered for a DDM field, the edit mask screen is invoked.

.F(file-name) Include a Predict file.

.I(n) Insert lines. Default is 10 lines, 5 in split screen mode.

.I(obj) Insert object. If object is not a data area, you can choose
if all variables and/or parameters are inserted.

.I(obj,sss,nnnn) Insert data area. sss defines the line number where to
start, nnnn defines the number of inserted lines.

.L Cause contents of line to remain unchanged.

.MX .MY Move X-marked or Y-marked line.

.MX-Y Move block of lines delimited by X and Y markers.

.N Mark a line for POINT command.

.P Position line in which command is entered to top of screen.


.R Redefine a field or variable.

.V (view-name) Define a view; if view-name not given, view currently in


the split-screen is included.

.X Indicate beginning of block of lines to be processed.


.Y Indicate end of block of lines to be processed.

.* Generate C* (internal count) variable for multiple-value


field or field within periodic group.
number(n,m) Number of field/group from split screen which is to be
inserted; n specifies the number of fields to be inserted;
m specifies the level where to be inserted;
direction indicator controls insertion location

Note: If direction indicator is +, lines are placed after line in which


command is entered; if direction indicator is -, lines are placed befor
line in which command is entered.

==============================================================================
- Natural Editors -
- Natural Map Editor -
==============================================================================

Code Function

M Map Editor Menu


I Map Initialization
C Positional Commands / PF-Keys
L Line Commands
F Field Commands
D Defining Map Fields
E Extended Field Editing
A Array and Table Definition
P Processing Rules

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Map Editor Menu -
------------------------------------------------------------------------------
Code Function
------------ -----------------------------------------------------------------
D Display name, format, mode, position, and number of processing
rules for each field.

E Invoke Map Editor to create/modify a map or helpmap.

I Initialize a map.

H Initialize a help map.

M Maintain map profiles and devices.

S Save map.

T Test current map definition (including testing of processing


rules and help facilities).

W Stow (catalog and save) map.

Menu Entry Explanation


------------ ----------------------------------------------------------------

Name Source member which contains map or helpmap.

Profile Map profile currently in effect (library ID, user ID, or


SYSPROF).
------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Map Initialization -
------------------------------------------------------------------------------
DEFINE DELIMITERS FOR MAP OR HELPMAP
------------------------------------------------------------------------------
Delimiters prefix field or text constant to indicate class, attribute and
colour:
CLASSES COLOURS
A Input field BL Blue RE Red
M Output field (modifiable) GR Green TU Turquoise
O Output field (non-modifiable) NE Neutral YE Yellow
T Text constant PI Pink

ATTRIBUTES
B Blinking N Non-display
C Cursive/italic U Underlined
D Default V Reversed-video
I Intensified Y Dynamic (assigned by program)

DEFAULT DELIMITERS FOR MAP OR HELPMAP


------------------------------------------------------------------------------
CLASS (Cls) ATTRIBUTE (Attr) DELIMITER (Del)

T (text constant) D (default) blank


T (text constant) I (intensified) ?
A (input only field) D (default) _
A (input only field) I (intensified) )
A (input only field) N (nondisplay) �
O (output only field) D (default) +
O (output only field) I (intensified) (
M (modifiable field) D (default) &
M (modifiable field) I (intensified) :

FORMAT SETTINGS FOR MAP OR HELPMAP


------------------------------------------------------------------------------
Entry Explanation
------------- ----------------------------------------------------------------
Page Size Number of map lines to be edited (1-250);
Line Size Number of columns to be edited (5-249).

Column Shift To use all 80 columns in a map, specify '1'; else use '0'.

Layout Name of map source definition containing predefined layout.


dynamic If 'Y', specified layout will only become effective at runtime.

Zero Print 'Y' Field value of all zeros displayed with one zero;
'N' Zero value displayed as blank (default).

Case Default 'UC' All input converted to upper-case at map execution;


'LC' No lower to upper-case conversion.

Manual Skip 'Y' Cursor not moved automatically to next field at execution.

Decimal Char. Character used as decimal notation (can be changed with GLOBALS
command only).

Standard Keys 'Y' Last two lines of map remain empty for entering function-key
specifications at map execution;
'N' All lines are used for map.
Justification Type of field justification; R (right), L (left).

Print Mode Default print mode for variables:


C Alternative character set to be used;
D Double-byte-character mode to be used;
I Inverse print direction;
N Standard print direction.

Control Var. Name of control variable which determines attribute character-


istics of fields and texts with attribute definition AD=Y. Must
be defined in program using map.
CONTEXT SETTINGS FOR MAP OR HELPMAP
------------------------------------------------------------------------------
Entry Explanation
------------- ----------------------------------------------------------------
Device Check If device name entered, map settings will be checked for
compatibility with device profile.

WRITE Non-blank value causes result of map definition process to be a


Statement WRITE statement (map invoked from program with WRITE USING MAP).

INPUT Non-blank value causes result of map definition process to be an


Statement INPUT statement (map invoked from program with INPUT USING MAP).

Help Name of helproutine called at execution time when help function


is invoked for map (specify name, if it is a constant).
As field 'Y' Helproutine specified for map applies as default to each
default individual field,so field names may be passed to helproutine.
'N' Name of map may be passed to helproutine (default).

Automatic Rank (priority) for automatic Predict rules. Default is 1.


Rule Rank

Profile Name of session profile active at map initialization.


Name If ENFORCED displayed, only following map settings may be
modified: helproutine, upper/lower case conversion, field
justification, print mode and dynamic attribute.
FILLER CHARACTERS FOR MAP OR HELPMAP
------------------------------------------------------------------------------
Field Type Explanation
-------------------- ---------------------------------------------------------
Optional, Partial Input not mandatory, field need not be completely filled.
Required, Partial Input mandatory, field need not be completely filled
(AD=E).
Optional, Complete Input not mandatory; if filled, field must be completely
filled (AD=G).
Required, Complete Input mandatory, field must be completely filled (AG=EG).

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Positional Commands / PF-Key -
------------------------------------------------------------------------------

PF-key Command Function


------- -------- -------------------------------------------------------------
PF1 Invoke map editor help facility.

PF2 Display/modify current map settings.

PF3 .Q Terminate map editing and return to Edit Map menu.

PF4 Test map definition (without Predict rules).

PF5 .E Invoke extended field editing for field at cursor position.

PF6 .-- Move to top of map.


PF7 .- Move upwards half a window page.
.-nnn Move upwards nnn lines.

PF8 .+ Move downwards half a window page.

.+nnn Move downwards nnn lines.

.++ Move to bottom of map.

PF9 ./ Switch between split screen and full screen mode.

PF10 .< Move to left half a window page.

.<nnn Move to left nnn columns.


.<< Move to left border of the map.

PF11 .> Move to right half a window page.

.>nnn Move to right nnn columns.

.>> Move to right border of the map.

PF12 Ignore changes made on screen subsequent to last use of ENTER

.* Move top left corner to cursor position.

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Line Commands-
------------------------------------------------------------------------------
Command Function
--------- -------------------------------------------------------------------
..A Array table definition.

..An Array table definition with n occurrences (vertical).

..C Center a single line. Two '..C' commands on same screen will center
first line and adjust rest of selected lines.

..Cn Center line and move n-1 lines below it accordingly.

..C* Center line and move all lines below it accordingly.

..D Delete single line. Two '..D' commands on same screen will delete
block of lines delimited by commands.
..Dn Delete the line and n-1 lines below it.

..D* Delete the line and all lines below it. If delete operation affects
array elements, the array is deleted in total.

..E Invoke extended field editing for all fields contained in line.
Two '..E' commands entered on same screen cause all fields within
range of lines delimited by commands to be displayed for editing.

..En Invoke extended field editing for the line and n-1 lines below it.

..E* Invoke extended field editing for the line and all lines below it.
..Fc Fill empty spaces of line with the character 'c'.

..I Insert a single line. (Last empty line on screen is deleted.)

..In Insert n lines below line in which command is entered.

..I* Insert as many lines as possible below command line.

..J Join line with line below it. Two '..J' commands on same screen
joins range of lines delimited by commands.

..Jn Join line with n-1 lines below it.

..J* Join line with all lines below it.

..M Move line in which command was entered below the cursor line.
Two '..M' commands on same screen cause block of lines delimited
by commands to be moved below the cursor line.

..Mn Move line and n-1 lines below it below the cursor line.

..M* If line is below line containing cursor, move it and all lines
below it, to position below cursor. If line is above line contain-
ing cursor, move it and as many lines as possible, to position
below cursor.

..P Invoke PF-Key processing rule editing.

..Pn Invoke PF-Key processing rule editing for rank level n.

..Q Terminate map editing and return to Edit Map menu.

..R Repeat once all text constants on line in which command is entered.
Two '..R' commands entered on same screen cause text constants
within block delimited by commands to be repeated.

..Rn Repeat all text constants on this and n-1 following lines. If
cursor is below command line, text is repeated n times.

..S Split line at cursor position.


Two '..S' commands entered on same screen cause block of lines
delimited by commands to be split.

..Sn Split line and n-1 lines below it at cursor position.

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Field Commands -
------------------------------------------------------------------------------
Command Function (Specify range using (n), (*), or 2 or more field commands)
-------- --------------------------------------------------------------------
.A Define an array (applies to single field only and not range). Array
is positioned with upper left corner at position where command
entered. Array is redefined by applying '.A' to one of its elements.

.An Define a one dimensional array (no spacing, no offsets).


.C Center field between adjoining fields, i.e. enter '.C' in field to
be centered.
Center range of fields between adjoining fields, i.e. enter '.C' in
first and last field to be centered, or position cursor in last
field to be centered.

.D Delete field, i.e. enter '.D' in field to be deleted.


Delete range of fields, i.e. enter '.D' in first and last field to
be deleted; range may extend beyond single line. If array element is
deleted, entire array will be deleted.

.E Invoke extended editing for field (does not apply to range).

.J Join fields located on consecutive lines. Left boundary corresponds


to where command is entered; right boundary to cursor position.

.M Move field, i.e. enter '.M' in field to be moved, place cursor at


target position. Move range of fields, i.e. enter '.M' in first and
last field to be moved, place cursor at target position.
.Pnn Edit processing rules for a field.

.R Repeat field, i.e. enter '.R' in field to be copied, place cursor at


target position.
Repeat range of fields, i.e. enter '.R' in first and last field to
be copied, place cursor at target position.

.S Split line or line range, i.e. enter '.S' in field where splitting
to begin,place cursor at target position for right portion of field.

.T Truncate field or range of fields, i.e. enter '.T' in field at which


deletion is to begin. If array element is truncated, entire array
is deleted.
------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Defining Map Fields -
------------------------------------------------------------------------------
Define fields directly on screen: Enter delimiter character followed by
number of positions to be allocated for field (repetition factor (n)).
The following characters can be used:
9 Numeric position S Sign position (numeric field only)
0 Numeric right justified HH Hexadecimal (binary)
. Decimal notation X Alphanumeric position

Examples:
:000 (3 positions, numeric right justified)
:99.9 (3 positions, numeric with decimal point)
:S9(6) (6 positions, signed numeric)
:HHHH (4 positions, hexadecimal)
:X(7) (7 positions, alphanumeric)
Field assigned dummy name by map editor; must be assigned name prior to map
execution using either extended field editing or post assignment function.
Select field from user view or data definition: Specify object class and
then the object name. Valid object classes are:
A Parameter data area L Local data area S Subroutine
C Predict conceptual files M Map V View
G Global data area N Subprogram
H Helproutine P Program
Position view on screen with commands (+, -, ++, --, +n, -n).

To include user view field, enter delimiter character followed by the number
(left side view) or letter (right side view) of desired field; once all have
been selected, press enter to incorporate them into map definition. (Notation
'M' indicates selected field contains edit mask.) User view field name is used
as the map field name for fields selected from a user view.

Examples for selection:


:3 (field 3 of the left side view is selected)
:C (field C of the right side view is selected)

A Natural system variable, preceded by an output delimiter, may be specified


in a map definition.

Examples:
(*TIME
(*DATE
(*APPLIC-ID

'Post Assignment Function' is used to assign field name and attributes of user
view field or DEFINE DATA definition to a field which has been previously
defined (in layout) on the screen.
Enter the user view field number (or letter) as shown in view window directly
behind the delimiter of the field.

Function can only be used if formats of layout agree with field definition.
(N and P considered identical numeric.)
Function cannot be used for view arrays if one or more dimensions of that
array are smaller than dimensions of the array in the layout.

AL/FL/NL attribute is generated to layout definition with truncation or


expansion if length conflict occurs. Data truncated when AL/FL/NL specified.

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Extended Field Editing -
------------------------------------------------------------------------------
Entry Explanation
----------- ------------------------------------------------------------------
Fld or Arr Field or array name.
If field is taken from user view or data definition, name is
same as user view or data definition; if field is system variable,
name is same as variable; if field is neither of above, a dummy
name is assigned. Field must have name prior to map execution.
Field command .E available for long field names.

Fmt Format and length of the field. Dynamic variables are to be


defined as A(D) or B(D).

AD Field attributes.

ZP OFF Zero values for field not to be printed;


ON Zero values to be printed.

SG OFF No sign position to be allocated (only for numeric fields);


ON Sign position to be allocated (only for numeric fields).
HE Name of helproutine to be assigned to field
Syntax is: HE = operand1, (operand2 / = )
For multiple parameters enter '+' or '.E' for greater input
window.

Rls Number of processing rules defined for field.

AL/FL/NL Length to be used for field display.

CD Colour attributes.

CV Control variable for dynamic field attribute; must be defined with


format 'C' in user program. Variable contains MODIFIED data tag.

Mode Method by which field was created:


DATA Field selected from a DEFINE DATA definition;
SYS Field is system variable;
UNDEF Field created directly on screen (has a dummy name);
USER Name of field was created by extended field editing;
VIEW Field selected from a view (file).
PM Print mode: C (alternative character set), D (double-byte
character set), I (inverse print direction),
N (display permitted, but no hardcopy allowed).

DF Date format (only for date fields):


S (format yy-mm-dd), I (format yyyymmdd), L (format yyyy-mm-dd).

DY Dynamic string attributes.

EM Edit mask to be used for field.


Field command .E available for long edit mask assignments.

SB Selection box.
Define an array for the displayed values of the selection box.
This variable must be specified in the parameter definition of
the map editor.
Automatically a 'V' for the selection box will be placed behind
the map field.

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Array and Table Definition -

------------------------------------------------------------------------------

The 'Array Definition' is used to define occurrences and layout of an array.

Initiate array definition with field command '.A'; or with line command '..E'
and then marking desired field with function code 'A'.

The 'Table Definition' is used to define occurrences and layout of more than
one array at the same time (arrays must begin on same map line).

Initiate table definition with line command '..A'.


Entry Explanation (Array Definition)
-------------- ---------------------------------------------------------------
Top Dim Size of array as defined in user view or Natural program.

Dimensions Vertical Index, Horizontal Index, and Fixed Index. Order in


which dimensions are mapped is determined by number (0-3)
entered to left of Index entry.

Occurrences Number of occurrences to be defined for a dimension.

Starting From Starting index value for a dimension (numeric value or variable
name). If variable is not defined as map field, N7 is assumed.

Spacing Number of blank lines (vertical dimension) or blank columns


(horizontal dimension) between each dimension occurrence.
Main Index Number of vertical occurrences, starting position and number of
blank lines between each dimension occurrence.

Second Index Direction (horizontal or vertical), starting position, and


number of blank lines between each dimension occurrence.

Third Index Same as for second index.

Name Names of field arrays contained in the table.

Col Pos Column position in which the field is located.

Dimension Size of array as defined in user view, data definition, or as


Size in Natural program.

Order Order in which the dimensions are to be defined.


(M main, S second and T third index)

2nd Ind Occ. Number of occurrences defined for second index.

3rd Ind Occ. Number of occurrences defined for third index.

Array Definition Examples

Example 1: 1 dimensional array, 10 horizontal occurrences, 2 blank lines


DIMENSIONS OCCURRENCES STARTING FROM SPACING
0. Index vertical 1 0
1. Index horizontal 10 2
0. Index (h/v) V 1 0

Example 2: 2 dimensional array: 10 vertical occurrences, 1 blank line;


5 horizontal occurrences, 2 blank columns
DIMENSIONS OCCURRENCES STARTING FROM SPACING
1. Index vertical 10 1
2. Index horizontal 5 2
0. Index (h/v) V 1 0

Example 3: 3 dimensional array: 10 vertical occurrences, 1 blank line;


5 horizontal occurrences, 2 blank columns; The third dimension con-
sists of 2 ocurrences expanded vertically within the 1. dimenmsion.
DIMENSIONS OCCURRENCES STARTING FROM SPACING
1. Index vertical 3 1
2. Index horizontal 5 2
3. Index (h/v) V 2 0

Example 4: Variable I in 'Starting From' entry.


DIMENSIONS OCCURRENCES STARTING FROM SPACING
1. Index vertical 10 I 1
2. Index horizontal 5 3 2
0. Index (h/v) V 1 0

Example 5: 1 dimensional array: 30 occurrences in array of 2 columns and


15 lines
DIMENSIONS OCCURRENCES STARTING FROM SPACING
1. Index vertical 15 0
0. Index horizontal 2 10
0. Index (h/v) V 1 0

------------------------------------------------------------------------------
- Natural Editors -
- Natural Map Editor: Processing Rules -
------------------------------------------------------------------------------
Field-Related Processing Rules
------------------------------
1. Inline Processing Rules:
Are defined within map source, no name assigned; Predict is not required.
2. Free Predict Rules:
Have name assigned and stored in Predict dictionary.
To edit, enter rule during map creation and assign name to it.
3. Automatic Predict Rules:
Are defined by Predict administrator; apply to data base fields and all
automatic rules for that field are linked to map definition.
It can't be modified with map editor, but may be assigned a different
rank with 'P=n'.
If Predict rules are modified, or new rules are linked to a database field,
it is sufficient to recatalog map. If a field with linked Predict rules is
renamed, the rules are lost and must be linked again.
Function-Key-Related Processing Rules
-------------------------------------
1. Inline processing rules,
2. Free Predict rules.

Both may be used to assign activities to program sensitive function keys


during map processing. For function keys which already have a command assigned
by the program, this command is executed without any rule processing.

Command Function (Processing Rule Editing)


--------- -------------------------------------------------------------------
.P Invoke processing rule editing.

..E Invoke processing rule editing (function code 'P' must be placed
next to field to be edited).

..P Invoke PF-key processing rule editing.

.Prr Indicate rank 'rr' of processing rule. Rules executed in ascending


order by rank and screen position of the field (PF-key rules
assumed to have first screen position).
.P* Initiate menu (showing first three source lines) from which rules
may be selected for editing; name displayed for free Predict rules.
EXIT Return to map editing.

P Position forward to next rule defined for field.

P* Select rule from selection menu.

Prr Select rule with rank 'rr'.

P=rr Change rank of rule to rank 'rr'.

TEST Test the map.

UNLINK Unlink an inline or Predict free rule from a field.

Note: Switch between split and full screen with PF9. Upper window shows fields
defined in map.
To select a rule from all free Predict rules, enter '?' in the rule
name field of the processing rule editing screen.

For optimum performance, the following assignments are recommended for ranks
of processing rules.

Rank Processing Rule


--------- -------------------------------------------------------------------
0 Termination rule.
1-4 Automatic rules.
5-24 Format checking.
25-44 Value checking for individual fields.
45-64 Value cross-checking between fields.
65-84 Database access.
85-99 Special purpose.
==============================================================================

by Luis De Palma (luigidepalma@gmail.com)

You might also like