The fields which are to comprise a map definition can be specified in any of the ways described in this section.
Map fields are defined directly in the map editing area by entering a delimiter character followed by the number of positions to be allocated for the field. The following characters can be used:
||Numeric right justified|
||Decimal notation (numeric field only)|
||Sign position (numeric field only)|
||Hexadecimal (binary) (must be entered in groups of two)|
A repetition factor can also be specified in the form
(n), for example,
The following are examples of field definitions (the delimiter character can be changed as required):
||3 positions, numeric|
||3 positions, numeric right justified|
||3 positions numeric with decimal point|
||6 positions, signed numeric|
||4 positions, hexadecimal|
||1 position, alphanumeric|
||7 positions, alphanumeric|
Fields entered as shown above are assigned a dummy field name by the map editor. Each field must be assigned a name prior to map execution by using either the extended field editing or post assignment function (see the relevant sections). Other field formats can be specified using the extended field editing function.
You can define a map by selecting definitions from the local data definition of another Natural source object. Data definitions are either field definitions in a DDM or variable definitions.
For a list of objects that can be used to select data definitions, see Object Types and Codes.
Programs, subroutines, subprograms, helproutines and functions can
only be used if they contain a
DEFINE DATA LOCAL statement. The
definitions of a
DEFINE DATA USING statement are not available for
You cannot select fields of the Natural data format U (Unicode), C (Attribute Control) or Handle (object handles). They are not available for selection.
If you use constants for the bounds of an array and these constants are not defined in the local data definition of the selected Natural source object, the bounds are lost when you select the array.
You cannot select an item preceded by a period (.), such as a group.
Input and modifiable (input/output) fields can only be specified once in the map editing area.
This section covers the following topics:
To list and copy definitions from other Natural objects
Switch on split-screen mode, if required.
In the Ob (Object) input fields in the upper
left screen section, enter a valid object code (see also
Object Types and
Codes) followed by an object name, for example,
TEST as shown in the example in Step 4. If required, delete
any remaining characters in this line.
Leave the first input field (denoted by an underscore) of the upper left Ob input fields blank and enter a question mark (?) in the second input field or press PF1 (Help). If required, delete any remaining characters in this line.
When you press ENTER, the Select an Object screen appears with a list of all objects contained in the current library. You can press ENTER to scroll don the list. In the Select field, enter the number that corresponds to the object you want to select.
The data definitions in the
section of the Natural program (in the following
example, program TEST) are
displayed in the upper left section of the map editing screen.
To scroll in the list of data definitions, in the
Ob input fields, overwrite the existing entries (in the
TEST) with any of the following positioning commands and leave the
||Scrolls down one page in the list.|
||Scrolls to the end of the list.|
||Scrolls up one page in the list.|
||Scrolls to the beginning of the list.|
||Scrolls down n lines.|
||Scrolls up n lines.|
To display the data definitions of another object, in the Ob input fields in the upper right screen section, enter a valid object code (see Object Types and Codes) followed by an object name and delete any remaining characters in this line.
Ob P TEST Ob L LDA01 1 #NAME-START A20 A #NAME-START A20 2 #NAME-END A20 B #NAME-END A20 3 #MARK A1 C #PERS-ID A8 . EMPLOYEES-VIEW *V1 D #MAKE A20 4 PERSONNEL-ID A8 E #MODEL A20 5 NAME A20 . 001 --010---+----+----+---030---+----+----+---050---+----+----+---070---+----
Select an object from a list as described earlier in Step 2.
Copy data definitions into the map editing area:
In the map editing area, in any position of a blank line, enter a delimiter character followed by the sequential number or letter displayed next to the data definition required. For example:
Selects the data definition assigned to the number 3 (in the
Selects the data definition assigned to the letter C (in the
The characteristics of the data definitions (name, format, length or array definitions) are copied into the map.
For each map field copied from a DDM, an
is automatically generated into the map source. The
statement contains the name of the DDM file and field referenced by the map
field. You can check whether an
INCDIR statement contains an
invalid DDM reference by switching on the
CHKRULE option of the
COMPOPT system command. Natural then issues an
appropriate error message when you catalog the map definition. For detailed
information, see CHKRULE
- Validate INCDIR Statements in Maps in the
System Commands documentation.
From the map editing area, you can list all
statements and change the name of a DDM if required.
In any line of the editing area, enter the following line command:
A Modify INCDIR Statements of Map screen
similar to the example below appears with a list of all
statements generated into the source of the current map definition:
16:24:23 - Modify INCDIR Statements of Map MAPTEST - 2008-05-14 Top of List DDM Name Field Name AUTOMOBILES MAKE AUTOMOBILES OWNER-PERSONNEL-NUMBER FINANCE BANK AUTOMOBILES MODEL EMPLOYEES PERSONNEL-ID AUTOMOBILES BODY-TYPE EMPLOYEES FIRST-NAME AUTOMOBILES NUMBER-OF-CYLINDERS EMPLOYEES MIDDLE-I AUTOMOBILES HORSEPOWER EMPLOYEES NAME AUTOMOBILES PISTON-DISPLACEMENT EMPLOYEES MIDDLE-NAME AUTOMOBILES WEIGHT EMPLOYEES MAR-STAT AUTOMOBILES COLOR Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12--- Help Exit GenC -- - + ++
The list contains the names of all DDM files and DDM fields from which you copied a map field.
If required, change the DDM name for a
by replacing the name(s) in the DDM Name column.
Press PF5 to open the Generic Change window. In the New DDM Name field, enter the name of the new DDM to be used by all
INCDIR statements that reference this
The DDM name(s) in the corresponding
statement(s) are updated when you save the map definition by using either the
Listed below are the object types and the corresponding object-type codes that can be used to select data definitions:
|Object Type||Type Code|
|Parameter Data Area||
|Predict Conceptual Files (only if Predict is installed)||
|Global Data Area||
|Local Data Area||
O (General Object) is offered as a
convenience option, allowing the user to import data from a source without
specifying the correct object type. This is useful, if the user can specify an
object name, but cannot specify the object type. It is then possible to enter
O objectname in the
OB field of the map editor (where
objectname represents the object name).
The editor then automatically changes the object type from
the correct type and imports the data.
Natural system variables can also be specified in a map definition. For information about system variables, see System Variables and System Functions in the Programming Guide and the detailed variable descriptions in the System Variables documentation.
A system variable must be preceded by an output delimiter as indicated in the following examples:
(*TIME (*DATE (*APPLIC-ID