The data area editor is used to create and modify a data area. A data area is a Natural object of the type global data area (GDA), local data area (LDA) or parameter data area (PDA). For information on using a data area, see Data Areas in the Programming Guide.
A data area contains data element definitions, such as user-defined variables, constants and database fields referenced with a data view in a data definition module (DDM), which can be used by one or more Natural objects. You can also create copycode from a data area. Note that data views from a DDM cannot be defined in PDAs. However, you can convert a data view in a GDA or an LDA into a group structure and then save this GDA or LDA as a PDA.
The Data Area Editor documentation covers the following topics:
For information on Unicode and code page support for Natural editors, see Editors in the SPoD Environment in the Unicode and Code Page Support documentation.
You invoke the data area editor with the system command
EDIT
described in the System Commands documentation.
To invoke the data area editor for a new data area
Issue the EDIT
command specifying the
type of data
area (GLOBAL
, LOCAL
or PARAMETER
) you
want to create.
For example:
EDIT LOCAL
An editor screen with an empty editing area appears for a local data area (indicated in the top left corner of the screen) similar to the example shown in the following instructions.
To invoke the data area editor for an existing data area
Issue the command EDIT
specifying
the name of a
data area that has been stored as a source object in your current Natural
environment.
For example:
EDIT LDA1
An editor screen similar to the example below appears which contains
the source of the local data area LDA1
:
Local LDA1 Library SAGTEST DBID 10 FNR 32 Command > + I T L Name F Length Miscellaneous All -- -------------------------------- - ---------- -------------------------> * LDA for new application 1 INCOME A 20 (1:3,1:5) INIT ALL<'0'> 1 PERSON 2 SEX A 6 2 AGE N 3 1 NAME A 24 R 1 NAME /* REDEF. BEGIN : NAME 2 FIRST-NAME A 10 2 MIDDLE-INIT A 2 2 LAST-NAME A 10 C 1 DOLLAR A 5 CONST<'$US'> V 1 FINANCE-VIEW FINANCE 2 PERSONNEL-NUMBER N 8.0 P 2 MAJOR-CREDIT (1:1) /* PERIODIC GROUP 3 CREDIT-CARD A 18 (EM=XXX.XXX.XXX.XXX.XXX.XXX) 3 CREDIT-LIMIT N 4.0 3 CURRENT-BALANCE N 4.0 -- Current Source Size: 1969 Free: 78200 ----------------------- S 12 L 1 |
The editor screen contains the following items (from top to bottom): the top information line, the editor command line, the editing area and the bottom information line. These items are explained in the following sections.
The top information line of the editor screen can contain the following items (from left to right):
Data Area Type | Indicates the type of data area currently in the source work
area: Local , Global or Parameter .
The type can be changed by using the editor command
|
Modification
Indicator:
|
An asterisk (*) indicates whether the source code
currently in the source work area contains unsaved modifications. The asterisk
(*) also appears for new source code that has not yet been saved as a source
object.
The asterisk (*) is only visible if the editor profile option
Source Status
Message is set to The asterisk (*) disappears when you execute a successful
See also Exit Function. |
Data Area Name | The name of the data area currently in the source work area. No
name is displayed if the source work area is empty or if the current source
code has not yet been saved as a source object with the
SAVE ,
CATALOG or
STOW
command.
|
Lib | The library where you are currently logged on. |
DBID | The database ID of the current system file. |
FNR | The file number of the current system file. |
The command line is indicated by the editor's Command prompt. In the command line, you can enter one of the following:
Any Natural system command.
For example: The system command CHECK
can be
used for checking the syntax of source code and
SAVE
for saving source code (see also Storing and Cataloging a Data
Area).
For other system commands related to maintaining and using object sources, see Managing Applications with Natural Objects in the System Commands documentation.
The name of a Natural program to be executed.
One or more editor commands.
Note:
If you have changed a definition by typing in a modification or by
using an editor command, a system command cannot be entered until you press
ENTER.
The direction indicator entered next to the > (greater than) sign in the command line determines the operation direction of particular editor and line commands:
(plus sign)
The command executes from the top line displayed on the screen (or from the line in which a line command is entered) towards the end of the source. This is the default setting.
(minus sign)
The command executes from the top line displayed on the screen (or from the line in which a line command is entered) towards the beginning of the source.
More detailed information on the direction indicator can be found in the descriptions of the editor and line commands affected by the operation direction.
See also the editor profile option Direction Indicator described in Editor Profile.
The bottom information line of the editor screen can contain the following:
The size (number of characters) of the current source. This
information is only displayed if the editor profile option
Source Size
Information is set to Y
(see
Editor
Profile).
The number of characters still available in the source work area. This
information is only displayed if the editor profile option
Source Size
Information is set to Y
(see
Editor
Profile).
S
The size (number of lines) of the source being edited.
L
The number of the source line currently displayed as the top line.
The editing area is either empty or contains source code that was last
read into the source work area with the command EDIT
or READ
as shown in the example in
Invoking the Data Area
Editor.
When you read in the source of an existing object, the entire source code is loaded into the source work area and is available for editing. However, depending on the size of the source, the editing area may not show all of the lines that belong to the source. In this case, you have to scroll down in the source to go to the line you want to view or modify.
In addition, if you use split-screen mode, the editing area displays fewer lines of source code. See also Split-Screen Mode.
To navigate in the editing area
Use the editor commands described for the program editor in Editor Commands for Positioning.
All positioning commands described for the program editor can be used with the data area editor as well.
To create or modify variables or fields
Type in or modify all variable or field definitions in the columns of the relevant source line.
You can specify whether the characters you type are automatically converted to upper case by using the editor profile options Editing in Lower Case and Dynamic Conversion of Lower Case (see Editor Profile).
Or:
Use one or more line
commands as described in the relevant section.
A line command, for example, is used to insert a line, copy variable or field definitions from another Natural object, or invoke the extended field definition editing function.
Or:
Use one or more editor
commands as described in the relevant section.
An editor command, for example, is used to delete a block of lines or specify prefixes for names.
The editing area of the editor screen is organized in columns where all attribute definitions that belong to a variable or field are maintained in one line.
The editing area contains the following columns:
Column Heading | Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
I |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
T |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
L | The level number of the variable or field (1 - 99). Variables which are not within a hierarchical structure and view definitions must be assigned level 1. Level numbers cannot be used with data block definitions. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Name | The name of the variable or field, block or view.
For valid names, see Naming Conventions for User-Defined Variables in the Using Natural documentation. For a user-defined constant, see also
Instead of specifying a variable name, the filler option
|
||||||||||||||||||||||||||||||||||||||||||||||||||
F | The Natural data format of the variable or field.
For valid formats, see Format and Length of User-Defined Variables and Special Formats in the Programming Guide. For a counter field ( |
||||||||||||||||||||||||||||||||||||||||||||||||||
Length | The length of the variable or field.
For valid lengths, see Format and Length of User-Defined Variables in the Programming Guide. No length is permitted for the Natural data formats C, D, T and L.
You can define dynamic variables by specifying For a counter field ( |
||||||||||||||||||||||||||||||||||||||||||||||||||
Miscellaneous | This input field can be used to enter the definitions described in Using the Miscellaneous Column. |
The definitions that can be entered in the fields of the Miscellaneous column are described in this section.
As the Miscellaneous field may be too short to
make all required specifications, the .E
line
command is provided for
extended field
definition editing.
A definition can be of up to 32 characters, whereby only 26 characters
are displayed on the screen. You can scroll in the field by using the editor
command M
+/-
. You can display all of the 32 characters or enter
additional characters in an extra window, which opens when you enter a question
mark (?) in the first position of the Miscellaneous
field.
You can define the following:
- Array
Enter the upper and lower bounds of an array. For detailed information on defining arrays, see Arrays in the Programming Guide.
Examples:
(2,2) /* 2 dimensions, 2 occurrences (2,2,2) /* 3 dimensions, 2 occurrences (1:10,2) (-1:3,2)- Initial Value
Not applicable to PDAs.
Enter an initial value according to the common Natural syntax definitions in a
DEFINE DATA
statement. For detailed information on defining initial values, see Initial-Value Definition and Initial/Constant Values for an Array in the Statements documentation.INIT<3> INIT<'ABC'> INIT<H'F1F2'> /* binary variable (B2) CONST<12> INIT ALL<'ABC'>- Edit Mask, Header and/or Print Mode
Edit masks and headers do not apply to PDAs.
Enter an edit mask or a header definition and/or the print mode according to the syntax rules that apply to the corresponding session parameters
EM
orEMU
,HD
andPM
described in the Parameter Reference documentation.Examples:
(EM=999.99) (HD='TEXT' EM=XXX.XXX.XX PM=N)- Comment
A commentary text which must be preceded by a slash and an asterisk ( /*).
- Name of a DDM
For a view definition, you must enter the name of the DDM from which the view is derived.
You can modify the name of the DDM if all fields of the view are also contained in the DDM with the modified name.
- Name of a Parent Block
For a block definition, you must enter the name of the corresponding parent block.
The extended field definition editing function can be used to define the following:
Parameters and arrays within PDAs.
Arrays, initial values, edit masks and headers within LDAs and GDAs. This is an alternative to using the Miscellaneous column.
To execute the extended field definition editing function
In the T column, next to the variable or field for which you want to define extended attributes, enter the following line command:
.E
An Extended Field Definition Editing menu similar to the example screen for a user-defined variable in an LDA is shown below:
17:54:34 ***** EDIT FIELD ***** 2010-08-23 - Extended Field Definition Editing - Local *LDA2 Library SAGTEST DBID 10 FNR 32 Code Function Definition ----- ------------------------------ ---------- S Single Value Initialization no F Free Mode Initialization no E Edit Mask Definition no A Array Index Definition no ? Help . Exit ----- ------------------------------ ---------- Code ? for Field: #USER-VARIABLE-1(A10) |
The functions provided on the Extended Field Definition Editing menu depend on the type of the data area, the type of variable and the contents of the Miscellaneous field. For example, if a variable has already been initialized in the Miscellaneous field, the functions and are not available.
Note:
If .E
is executed for a DDM field, the
Define Edit Mask / Header screen (see the following step)
is invoked immediately, because only edit masks and headers can be defined for
DDM fields. It is not possible to define initial values for DDM
fields.
Select the function required by entering the code that corresponds to the function required. For explanations of the functions available, see Functions in the Extended Field Definition Editing Menu.
Depending on the function selected, either another menu or an extended field editing area similar to the example of a Define Edit Mask / Header screen below appears:
17:50:59 ***** EDIT FIELD ***** 2010-08-23 - Define Edit Mask / Header - Local *LDA2 Library SAGTEST DBID 10 FNR 32 Command #USER-VARIABLE-1(A10) ---------------------------------------------------------------------- (EM= ) ---------------------------------------------------------------------- Save as unicode edit mask (EMU) .. N (Y/N) #USER-VARIABLE-1(A10) ------------------------------------------------------------------- (HD=' ') ------------------------------------------------------------------- |
Type a definition or enter a function code respectively.
Note:
A definition is not checked for syntax errors during
editing. You can check a definition with the
CHECK
command after you terminated extended field definition editing.
When you are finished and return to the Extended Field Definition Editing menu, the Definition column reflects the changes as shown in the following example:
17:59:00 ***** EDIT FIELD ***** 2010-08-23 - Extended Field Definition Editing - Local *LDA2 Library SAGTEST DBID 10 FNR 32 Code Function Definition ----- ------------------------------ ---------- S Single Value Initialization no F Free Mode Initialization no E Edit Mask Definition yes A Array Index Definition no D Delete all Definitions ? Help . Exit ----- ------------------------------ ---------- Code ? for Field: #USER-VARIABLE-1(A10) |
If any initial values, edit masks, headers or array index definitions
have been defined, the corresponding status message in the
Definition column changes from no
to
yes
. If in a PDA any parameter type has been defined, an
abbreviation of the parameter type (for example, Val
for
call-by-value) is displayed in the Definition column.
Any definitions made within the Initial Values and Edit Mask / Header subfunctions are immediately incorporated into the data area currently displayed in the data area editor but are not displayed in the Miscellaneous column of the editing area. A corresponding entry is only displayed in the I column (label indicator).
The functions available in the Extended Field Definition Editing menu and the commands available in an extended field editing area are described in the following section.
All functions that can be available in the Extended Field Definition Editing menu are described in the following table.
For an attribute control variable, only the functions codes S, F, P, A and D are allowed.
For a field that redefines another field, only the function codes E, A and D are allowed.
Function Code | Function | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
S | Defines an initial value for the specified variable or field
in single-value mode. You only enter the required variable or field value; any
further specifications necessary (including apostrophes for alphanumeric
variables or fields, and value prefixes such as H for hexadecimal)
are generated automatically. For example, from an initial value of
F1F2 for a binary variable (B2), the data editor will generate
INIT <H'F1F2'> .
If the variable or field is an array, an initial value can (but does not necessarily have to) be defined for each occurrence. For arrays of large alphanumeric variables or fields (for example,
arrays of dynamic variables), enter With arrays, asterisk notation (*) can be entered in the command line to repeat the value in the last line of the previous page until the end of the current page. For attribute control variables, a screen is displayed where you
can select attributes and colors as initial values. For details on attributes
and colors, see the session parameters To define a constant value instead of an initial value, enter
|
|||||||||||||||||||||||||||||||||||||||
F | Defines an initial value for the specified field in free mode.
A free-mode editor is provided where you can enter your initial value
definitions according to the common Natural syntax definitions in a
DEFINE
DATA statement.
For detailed information on defining initial values, see Initial-Value Definition Initial/Constant Values for an Array in the Statements documentation. See also Examples in Initial Value. |
|||||||||||||||||||||||||||||||||||||||
E | Defines an edit mask and/or header for the specified field
according to the Natural rules for edit mask and header specifications.
If both an edit mask and a header are specified, together they must not exceed 57 characters in length. However, if only an edit mask is specified, it can be up to 63 characters long; if only a header has been specified, it can be up to 58 characters long. If |
|||||||||||||||||||||||||||||||||||||||
P |
|
|||||||||||||||||||||||||||||||||||||||
A | Defines array bounds for the specified field. A free-mode
editor is provided where you can enter your bound definitions in accordance
with the common Natural syntax definitions. While you are editing, however, the
specified values will not be checked (unless you enter the
CHECK
command).
|
|||||||||||||||||||||||||||||||||||||||
D | Deletes all definitions made with the S,
F, E, P and
A function codes. An additional screen is provided, where
you can specify the definitions to be deleted.
By default, all definitions are marked with |
The commands that can be entered in the command line of an extended field editing area are described in the following table:
Command | Function |
---|---|
EDIT |
Returns to the editing area of the editor screen. |
I |
Positions to the next index of the array. |
. |
Returns to the previous screen to continue processing. |
-- |
Returns to the beginning of the initial value specification(s). |
+ |
Scrolls down one page. If the last page has been reached or if there is only one page available, returns to the editing area of the editor screen. |
* |
Copies the initial value of the last occurrence of the previous page to all empty fields of the current page. It is only available for arrays in single-value mode. |
You enter a line command in the T column of a source line. We recommend that you enter a blank at the end of each line command. This prevents the editor from attempting to interpret any information existing on the line as part of the line command.
The default escape character which must precede each line command is a period (.). You can change the default character by using the editor profile option Escape Character for Line Command (see Editor Profile).
The line commands provided by the program editor are described in the
following section. The notation (n)
,
(nnn)
or
(nnnn)
indicates a repetition factor.
The default repetition value is 1 (with the exception of the
.I
line command). For explanations of the syntax
symbols used in this section, refer to System Command Syntax
in the System Commands documentation.
Command | Function |
---|---|
.C[(nnnn)] |
Copies the line in which the command was entered.
See also Notes for Line Commands. |
.CX[(nnnn)]
or .CY[(nnnn)] |
Copies the X-marked or the Y-marked line.
See also the line commands |
.CX-Y[(nnnn)] |
Copies the block of lines delimited by the X and
Y markers.
See also the line commands |
.D |
Deletes one or more lines beginning with the line in which you
enter the command towards the end of the source (regardless of any direction
indicator setting).
When entered for an individual field, only that field definition is deleted. When entered for a part of a hierarchical structure (view, group,
redefinition), all subsequent definitions on subordinate levels are also
deleted. For example, if you enter |
.D(nnnn) |
Deletes nnnn lines
beginning with the line in which you enter the command towards the end of the
source (regardless of any direction indicator setting). Unlike
.D (see above),
.D(nnnn) affects only the
number of lines specified, regardless of any hierarchical structure.
|
.E |
Invokes the Extended Field Definition
Editing screen which is used to define array bounds, initial values,
edit masks, headers and parameter attributes.
For more information, see the section Extended Field Definition Editing. |
.F(file-name) |
This command includes a Predict file (applicable to the file types Conceptual, Standard, Sequential and Other). The name of a Predict file is shown in the Miscellaneous column. |
.I[(n)] |
This command adds n
empty lines, where n can be in the
range from 1 to 9. If n is not (or not
correctly) specified, 10 lines (5 lines in split-screen mode) are added by
default.
Lines that are left blank are eliminated from the source, depending on the setting of the editor profile option Empty Line Suppression described in Editor Profile. Note: |
.I(obj) |
Copies variable or parameter definitions from another Natural
object of one of the following types:
Data area If the object specified as
Additionally, you can select one of the following:
If you incorporate unused variables, the level numbers might not be in the correct order. So, before compiling the data area, check the levels of all incorporated unused variables for correct numbering. If you incorporate variable definitions from objects without a
If a variable redefinition results in more than one variable, each variable is incorporated as one individual redefinition by using filler bytes where appropriate. If the specified object has been cataloged with the Natural Optimizer Compiler, initial values and constants cannot be incorporated. If the object you want to insert has features the data area editor does not support, an appropriate message appears and the relevant line is marked as a comment line. See also Notes for Line Commands. |
.I(obj,ssss,nnnn) |
Includes a GDA, an LDA or a PDA. This feature is only supported
for data areas which do not contain initial values or edit masks.
The If See also Notes for Line Commands. |
.L |
Undoes all modifications that have been made to the line since the last ENTER. |
.MX
or
|
Moves the X-marked or the Y-marked line.
See also the line commands |
.MX-Y |
Moves the block of lines delimited by the X and Y
markers.
See also the line commands |
.N |
Marks (invisibly) a line to be positioned at the
beginning of the source work area by the editor command
POINT
described in Editor Commands for Positioning.
The mark is automatically deleted when an error with a line command
or editor command occurs, or when the |
.P |
Positions the line marked with this command to the top of the screen. |
.R |
Redefines a variable or field as a single variable or a group of
variables.
With the filler option
( See also Notes for Line Commands. |
.V[(ddm-name[,NOFL])] |
Not applicable to PDAs.
Defines a view from a DDM. Specify the DDM ( In split-screen
mode, the DDM currently in the split screen is displayed in the
editing area when you enter If
If When a periodic group or multiple-value field defined - in a DDM
generated with Predict - as If Predict is active, Predict redefinitions and comments are incorporated too. With VSAM views, the actual number of occurrences is always displayed. In addition, VSAM views contain information on subdescriptors and superdescriptors. For further information, see the Natural for VSAM documentation. |
.VG |
Only applies to views.
Converts all fields of a view definition to fields of a group structure. You enter If the view definition was inserted with the If the view definition contains a counter field
( Note: |
.X |
Not applicable to periodic groups,
multiple-value fields or view definitions.
Marks a line with an X. See also Notes for Line Commands. |
.Y |
Not applicable to views, periodic groups or
redefinitions.
Marks a line with a Y. See also Notes for Line Commands. |
.* |
Generates a counter field (C*
variable) for multiple-value fields or fields within a periodic group.
See also Notes for Line Commands. |
number
[(nnn[,m])] |
This command is available in split-screen mode and with a DDM in
the split-screen area only.
To obtain fields and groups from the split-screen area, the line
number of the field or group from the split-screen area must be specified in
the first column, without a period (.). Fields and groups from the split-screen
area can be included as fields of a view (if
If the selected field has the same name as the field for which the command was entered, it is substituted instead of inserted. Multiple lines can be obtained from the split screen by using the
The See also Notes for Line Commands. |
The commands
.I(obj)
,
.R
and .*
are available
in full-screen mode only, not in split-screen mode.
If both the commands .X
and
.Y
are applied to one line, it is treated as being
marked with an X and with a Y; the line marker actually shown to reflect this
status is a Z
.
If the direction
indicator is set to +
(plus sign), the copied, inserted
or moved lines are placed after the line in which the corresponding
command was entered; if the direction indicator is set to -
(minus
sign), the copied, inserted or moved lines are placed before the line
in which the command was entered.
The editor commands that can be entered in the command line of the data area editor are described in the following section. For explanations of the syntax symbols used in this section, refer to System Command Syntax in the System Commands documentation.
Command | Function | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ADD[(n)] |
Adds n blank lines. If
the direction indicator
is set to + (plus sign), the lines are added after the last line
of the object being edited; if the direction indicator is set to -
(minus sign), the lines are added before the first line of the object.
The value for n can be in the range from 1 to 9. If n is not (or not correctly) specified, 9 lines (4 in split-screen mode) are added by default. With the next ENTER, lines that are still left blank are eliminated. |
||||||||||||||
CANCEL
or
(a period) |
Leaves the editor. Any modifications made since
the last time the SAVE command was
entered are not saved.
|
||||||||||||||
CATALOG
[object-name]
|
Executes the system command CATALOG
which checks and catalogs the current data area definition.
You must supply an object name with the command if you catalog a new data area definition or if you want to copy the current data area. See also Storing and Cataloging a Data Area. |
||||||||||||||
CHANGE
['scan-value'replace-value'] |
Scans the data area for a character string
(scan-value ) and replaces each such
scan-value found with the character
string entered as replace-value . Any
special character which is not valid within a Natural variable name can be used
as the delimiter character.
Each line in which a character string is replaced is marked with an
For information on how the scan operation is performed, see the
|
||||||||||||||
CHECK |
Executes the system command CHECK which
checks the syntax of the current data area definition. If an error is found,
the erroneous line is marked with an E and an appropriate error
message appears in the message line. If no errors are found, a message appears
indicating successful completion of the check.
Array definition |
||||||||||||||
CLEAR |
Executes the system command CLEAR which
clears the source work area. Changes to the data area currently contained in
the source work area are lost if they were not previously saved.
|
||||||||||||||
DX
or
|
Deletes the X-marked or the Y-marked line. | ||||||||||||||
DX-Y |
Deletes the block of lines delimited by the X and Y markers. | ||||||||||||||
EX
or
|
Deletes lines from the top of the editing area to, but not including, the X-marked line; or from the line following the Y-marked line to the bottom of the editing area. | ||||||||||||||
EX-Y |
Deletes all lines in the source work area excluding the block delimited by X and Y. | ||||||||||||||
EXIT |
Leaves the editor. Any modifications to the source are saved depending on the setting of the editor profile described in Exit Function. | ||||||||||||||
GENERATE
[object-name] |
Generates a Natural object of the type copycode from the data
area definition currently in the source work area. The program editor opens
with the generated copycode source in the editing area including a DEFINE
DATA LOCAL and corresponding END-DEFINE statement.
If an |
||||||||||||||
M
+|- |
|
||||||||||||||
PROFILE
[name] |
Invokes the Editor Profile screen where you can view or change your current editor profile settings. For details, see the section Editor Profile. | ||||||||||||||
READ
object-name |
Executes the system command READ
which reads an existing data area definition into the source work area. For all
syntax rules that apply to the command, see READ in the
System Commands documentation.
|
||||||||||||||
RESET |
Deletes the current X and Y line markers and any
marker previously set with the line command .N . See also
the line commands .X and
.Y .
|
||||||||||||||
SAVE
[object-name]
|
Executes the system command SAVE
which saves the current data area definition.
You must supply an object name if you save a new data area definition or if you want to copy the current data area. See also Storing and Cataloging a Data Area. |
||||||||||||||
SCAN
scan-value
|
Scans the data area for a character string
(scan-value ) in the
Name (default) and/or the
Miscellaneous column of the editor screen, depending on
whether the SET
SCAN command was executed earlier.
Each line in which the
The first line which contains the
Note: If the direction indicator is set to |
||||||||||||||
SCAN
=[+|-]
|
Scans for the next occurrence of the
scan-value specified with the
SCAN
command.
The direction for a given scan command can be explicitly specified
by entering Note: |
||||||||||||||
SET ABS
[ON|OFF] |
|
||||||||||||||
SET PREFIX
prefix|OFF
|
Specifies a prefix for variable or field names.
This prefix is then automatically placed before the value entered in the Name column for each line that is entered or modified, unless the name already begins with this prefix. If the concatenated variable or field is longer than 32 bytes, an appropriate message appears and the value in the Name column can be shortened. If this is not done, the prefix will not be inserted. |
||||||||||||||
SET SAVEFORMAT
V31|V41
or SET SF V31|V41 |
Specifies
the default source format of data areas.
If set to If is set to See also Source Format for Data Area Storage. |
||||||||||||||
SET SCAN
COMMENT|NAME|ALL |
|
||||||||||||||
SET SIZE ON|OFF |
If SET SIZE is set to
ON ,
the size of the data area is displayed in the bottom information line of the
editor screen.
The |
||||||||||||||
SET STAY
ON|OFF |
If STAY is set to ON ,
the current screen will stay when ENTER is pressed. Forward and
backward positioning can be done by positioning commands only.
If The |
||||||||||||||
SET TYPE
G|L|A |
|
||||||||||||||
SPLIT
parameter |
Splits the editor screen and displays the source
of another Natural object in one half of the screen as described in
Split-Screen
Mode.
|
||||||||||||||
STOW
[object-name]
|
Executes the system command STOW
which saves and catalogs the current data area definition.
You must supply an object name if you
|
The editor commands that can be used for navigating through the current data area are described in the following section. You enter an editor command in the command line of the data area editor.
Command | Function |
---|---|
ENTER
or +P
or
|
Positions forwards one page. |
-P
or
|
Positions backwards one page. |
+H |
Positions forwards half a page. |
-H |
Positions backwards half a page. |
T
or
|
Positions to top of source. |
B
or
|
Positions to bottom of source. |
+nnnn |
Positions forwards nnnn lines (maximum 4 digits). |
-nnnn |
Positions backwards nnnn lines (maximum 4 digits). |
X |
Positions to the line marked with an X .
|
Y |
Positions to the line marked with a Y .
|
POINT |
Positions to the line in which the line command
.N
was entered.
See also the line command |
Before a data area can be used in a Natural program (or another object), it must be saved and cataloged as a source object and/or a cataloged object that is stored in a Natural library in the current system file.
To save and/or catalog the current data area
Use the system command SAVE
,
CATALOG
or STOW
as
described in
Saving
and Cataloging Objects in the Using
Natural documentation.
Note:
When you leave the data area editor with the
EXIT
editor command, the current source code is
saved automatically if the appropriate
editor profile
option is set accordingly as described in
Exit
Function.
To keep a copy of the current source
Use the editor options Source Save into and Auto Save Numbers as described in Editor Profile.
A copy of the source edited last with any of the Natural editors is then automatically saved as a source object in the current Natural environment.
The data area editor uses an internal source format to store the sources of data areas in the FUSER system file. New features and definitions that are available from Natural Version 4.1 onwards require that the data area source is stored in the FUSER system file using an extended source format.
The space the extended source format requires to store the extended fields of Natural Version 4.1 (and above) features and definitions in the system file is higher than the space required by the old source format.
Data areas that are stored using the extended source format cannot be used or edited with Natural Version 3.1 where a different source format was used. The data area editor of Natural Version 4.1 (and above) supports the Natural Version 3.1 format and the extended source format. The editor can read both formats and converts the Natural Version 3.1 format to the extended source format.
Data areas are stored in the Natural Version 4.1 source format by default.
As long as no Natural Version 4.1 (and above) features or definitions are used, data areas can also be stored in the Natural Version 3.1 format.
The source format to be used as a default for storing data areas can be
specified with the user exit routine GDA-EX01 (see
User Exit for the Data Area
Editor) or, during an editor session, with the following
editor command: SET SAVEFORMAT V31
or SET
SAVEFORMAT V41
.
The data area editor provides a user exit routine for specifying default
settings. The source of the user exit routine is provided in the library SYSEXT
and named GDA-ES01. To activate this exit, CATALOG
or STOW
the source object as GDA-EX01 and copy
GDA-EX01 to the library SYSLIB. For a detailed description, see the source
object of GDA-ES01 in the library SYSEXT.
The exit function is used to terminate the current editor session by
issuing the EXIT
command.
The effect of the EXIT
command depends on the
setting of the editor
profile option
Prompt Window
for Exit Function:
If the option is set to Y
(default setting), the
EXIT
command invokes the EXIT
Function window whenever you execute the command on a source that
contains unsaved modifications (see also
Modification Indicator). If
no modifications were made to the source, the window does not appear
and the editor closes without saving the source.
The EXIT Function window provides the following options:
Option | Explanation |
---|---|
Save and Exit | Saves all modifications made to the current source code and leaves the editor. See also SAVE Object Window. |
Exit without Saving | Leaves the editor without saving any modifications made to the current source code since it was last saved. |
Resume Function | Neither leaves the editor nor saves any modifications; the prompt window is closed and the current function is resumed. |
If the option is set to N
, the
EXIT
command executes the Save and
Exit function: saves all modifications made to the current source
and leaves the editor. See also
SAVE Object
Window.
The Save and Exit function invokes the SAVE Object window if no object name has yet been defined for the current source code (as indicated in the top information line).
This window prompts you to enter an object name and type. If you confirm your entries with ENTER, the source is saved under the specified name as a new object in the current library and the editor is terminated. PF3 closes the window without any action and the editor session is retained.