Version 6.3.8 for OpenVMS
 —  Editors  —

Using the DDM Editor Screen

The DDM editor screen is organized in a table where the field definitions data is contained in rows and columns. All attributes that belong to a field defined for a DDM are contained in one row (that is, source-code line), separated by tabs.

This section describes the columns contained on the DDM Editor screen and the commands provided to create or modify a DDM field, navigate in the screen, or catalog a DDM source, for example.


DDM Header Information

This section describes the fields contained in the header at the top of the DDM editor screen and how to modify them.

Explanation of DDM Header Fields

Header Field Description
DBID

The database ID (DBID) as specified in the global configuration file. DBID contains the database file referenced by the DDM.

Valid range: 0 to 65535 (except 255)

See also: DBMS Assignment and Database Management in the Configuration Utility documentation.

If 0 (zero) is specified, the default DBID as specified with the UDB profile parameter in the Natural parameter file (NATPARM) is used.

To modify the field contents, see To modify the contents of DDM header fields.

FNR The number of the file being referenced in the database

To modify the field contents, see To modify the contents of DDM header fields.

DDM The name of the DDM currently contained in the work area of the DDM editor.
Line The number of the source-code line where the cursor is currently positioned.
DEF. SEQ.

The default sequence by which the file is read when it is accessed with a READ LOGICAL statement in a Natural program. See also the READ statement described in the Statements documentation.

The default sequence is specified with the two-character field short name. The system validates the short name based on the selected file number. If the database is accessible, the short name is checked against the corresponding field in the database file. If such a field does not exist in the database, a selection list of valid short names is displayed. If the database cannot be accessed, no selection list is generated.

To modify the field contents, see To modify the contents of DDM header fields.

Start of instruction setTo modify the contents of DDM header fields

  1. Press F13.

    Or:
    From the MISC menu, choose MODIFY DDM-HEADER.

    The cursor is positioned in the first header field (DBID) that can be modified.

  2. Press TAB to go to the next header field to be modified.

Top of page

Columns of Field Attributes

This section describes the field attributes that can be defined in the rows and columns of the DDM editor screen.

Column Heading Field Attribute
T
The type of field:
   
blank Elementary field.
This type of field can hold data and does not contain any other fields.
It can have only one value within a record.
   
G Group.
A group is a number of fields defined under one common group name. This allows you to reference several fields collectively by using the group name instead of the names of all the individual fields. Such fields cannot hold any data, but are only containers for other fields.

Note:
Groups defined in a DDM need not necessarily be defined as groups in the Natural object(s) that reference this DDM.

   
M Multiple-value field.
This type of field can have more than one value within a record.
See also Multiple-Value Fields in the Programming Guide.
   
P Periodic group.
A group of fields that can have more than one value within a record.
See also Periodic Groups in the Programming Guide.
   
* Comment line.
L The level number assigned to the field.

Levels are used to indicate the structure and grouping of the field definitions. This is relevant with view definitions, redefinitions and field groups (see the relevant sections in the Programming Guide).

Valid level numbers are 1 - 7.

Level numbers must be specified in consecutive ascending order.

DB

The display of the DB column is switched off by default. To switch the display on or off, press F12 (toggle switch).

The DB column displays the two-character short name of the corresponding field in the database file (see also Example of a DB Column).

Creating Fields:

If you create a new DDM field and the display of the DB column is switched off, the DDM editor assigns to the new field a short name that has not yet been used for another field. This means that for the new field there is no correlation between the database file and the DDM. To guarantee that the short name of a new field is checked against the database, create a field by using the line command I as described in the section Commands for Editing and Function Execution.

Name The name of the field.

It can be 3 - 32 characters.

The rules to create a name comply with the naming conventions for user-defined variables (see the Using Natural documentation), except that the first character of the name must always be a Latin capital letter (A - Z). In addition, the name must not start with L@ or N@. These prefixes identify indicator fields as explained in the following section.

The field name is the name used in other Natural objects (for example, in a program) to reference the field.

The field name is unique across the whole DDM.

F The Natural data format of an elementary field, such as A (alphanumeric), P (packed numeric) or L (logical).

For valid Natural data formats, refer to Format and Length of User-Defined Variables in the Programming Guide.

Length
The standard length of an elementary field.

This length can be overridden by the user in a Natural program.

For numeric fields (Natural data format N), the length is specified as nn.m, where nn is the number of digits before the decimal point an m is the number of digits after the decimal point.

 
In the Length input field, you can specify either the field length as a numeric value or enter the keyword DYNAMIC to specify that the field length is variable.

For further information, see DDM Generation and Editing for Varying Length Columns in the Programming Guide.

S

Null-value suppression option:

   
blank Indicates that standard Adabas suppression is used; that is, trailing blanks in alphanumeric fields and leading zeros in numeric fields are suppressed.
   
F Indicates that the field is defined with the Adabas fixed storage option; that is, no suppression is used and the field is stored without compression.
   
N Indicates that the field is defined with the Adabas null-value suppression option. This means that null values for the field are not stored in the inverted list and are not returned when the field is used in the WITH clause of a FIND statement, or in a HISTOGRAM or READ LOGICAL statement.
   
M Indicates that the field is defined with the SQL null-value option not null. The Remark field (see Specifying Extended Field Attributes) for this field contains NN NC (not null, not counted). Below this field, the corresponding null-indicator field is listed.
D
The Adabas descriptor type of an elementary field that is not an array.

A descriptor can be used as the basis of a database search performed with the READ or the FIND statement. For example: a field from an Adabas database that has a D or an S in the D column can be used in the BY clause of the READ statement. Once a record has been read from the database using the READ statement, a DISPLAY statement can reference any field that has either a D or an S in this column.

Descriptors types are:
   
blank No descriptor.
This field is not a descriptor.
   
D Elementary descriptor.
Value lists are created and maintained for this field by Adabas, so that this field can be used as a search criterion in a FIND statement, as a sort key in a FIND statement, or to control logical sequential reading in a READ statement.
   
H Hyperdescriptor.
A hyperdescriptor is a user exit in Adabas. For Natural, it provides the same functionality as a phonetic descriptor (see below).
   
N Non-descriptor.
A non-descriptor is not a descriptor, but can be used as a search field for a non-descriptor search.
   
P Phonetic descriptor.
A phonetic descriptor allows the user to perform a phonetic search on a field (for example, a person's name). A phonetic search results in the return of all values which sound similar to the search value.
   
S Subdescriptor or superdescriptor.
If a sub/superdescriptor contains a multiple-value field or a field from a periodic group (or part of such a field), the sub/superdescriptor is marked with an M or a P in the field type column; this enables Natural to create the correct search algorithms for this sub/superdescriptor.

Example of a DB Column

 01/10/2004                       DDM Services                               
 19:02:57               V 6.1.1 Pl 9   Software AG 2004              Line: 1 
 DBID: 20    FNR: 14    DDM: EMPLOYEES                        DEF.SEQ.:      
    C   T  DB  L Name                              F  Length  S  D           
           AA  1 PERSONNEL-ID                      A     8       D           
        *        CNNNNNNN                                                    
        G  AB  1 FULL-NAME                                                   
           AC  2 FIRST-NAME                        A    20    N              
           AD  2 MIDDLE-I                          A     1    N              
           AE  2 NAME                              A    20       D           
           AD  1 MIDDLE-NAME                       A    20    N              
           AF  1 MAR-STAT                          A     1    F              
        *        M=MARRIED                                                   
           AG  1 SEX                               A     1    F              
           AH  1 BIRTH                             N  06.0       D           
           AH  1 N@BIRTH                           I     2       D           
        G  A1  1 FULL-ADDRESS                                                
        M  AI  2 ADDRESS-LINE                      A    20    N

Indicator Fields

An indicator field is used to retrieve the length of a variable length field or information about the data significance (NULL value indicator) of a database field. An indicator field does not provide the contents of a database field.

A database field name starting with L@ or N@ is interpreted as an indicator field, according to the indicator specified in the NATCONV.INI configuration file (see also IDENTIFIER-VALIDATION in How to Use Different Character Sets in the Operations documentation. Therefore, a database field name must not start with any of these character strings unless it represents an indicator field.

The following happens when a DDM is initially generated.

Help on Columns of Fields

The following section describes how to invoke the help function for the columns of fields provided on the DDM editor screen.

Start of instruction setTo display help information on field columns

Top of page

Commands for Editing and Function Execution

This section provides information on the positioning commands, line commands, editor commands and Natural system commands provided with the DDM editor.

Positioning commands are used to navigate in the DDM editor screen and line commands manipulate one or more lines of DDM source code. Editor commands, for example, are used to change the display mode of the editor screen and system commands, for example, are used to save the source and the cataloged object of the DDM.

Positioning Commands

You can use the following keys to navigate in the DDM editor screen:

Key Explanation
DOWN-ARROW Scrolls down one line.
LEFT-ARROW Moves left on the screen.
RIGHT-ARROW Moves right on the screen.
UP-ARROW Scrolls up one line.
TAB Moves from one input field to the next.

Line Commands

The line commands available in the DDM editor are used to copy, delete, insert or move single or multiple DDM source-code lines. As an alternative to entering line commands in the DDM source as described below, you can use the equivalent function (F) keys described in Function-Key Assignments.

Start of instruction setTo execute a line command

Editor and System Commands

The editor commands or Natural system commands available in the DDM editor are executed by choosing either a command from the DDM editor menu COMMANDS, MISC or QUIT, or a function (F) key.

Start of instruction setTo execute an editor or a system command from a menu

  1. On the DDM editor screen, press ESC.

    The DDM editor menus COMMANDS, MISC and QUIT appear at the top of the DDM editor screen.

    (See also the example screen in Terminating the DDM Editor.)

  2. Select a menu and press ENTER.

    A list of valid commands appears. The commands and their equivalent F keys (if available) are explained later in this section.

  3. Choose the command to be executed for the current DDM source and press ENTER.

The following section describes the editor or system commands provided with DDM editor menus and the standard F-key assignments.

COMMANDS Menu

The commands available with the COMMANDS menu correspond to the Natural system commands with the same name. They are used to check or scan the DDM source currently contained in the editing area of the DDM editor, and save the source as a source and/or cataloged object in the current Natural library and/or system file.

The COMMANDS menu options and equivalent F keys (if available) are explained in the following table:

Menu Option F Key Explanation
CATALOG   Saves the DDM source as a cataloged object as described for the system command CATALOG in the System Commands documentation.
CHECK F11 Checks the syntax of the DDM source as described for the system command CHECK in the System Commands documentation.
SAVE   Saves the DDM source as a source object as described for the system command SAVE in the System Commands documentation.
SCAN   Searches for a string of characters within the DDM source, with the option to replace the string with another string as described for the system command SCAN in the System Commands documentation.
STOW F10 Checks the syntax of the DDM source and saves both the source and the cataloged object as described for the system command STOW in the System Commands documentation.

MISC Menu

The MISC menu options and equivalent F keys (if available) are explained in the following table:

Menu Option F Key Function
DB-SHORT-NAMES (ON/OFF) F12

Switches the display of the attribute column DB on the DDM editor screen on or off. See also DB in the section Columns of Field Attributes.

MODIFY DDM-HEADER F13 Displays in edit mode the DDM editor header fields DBID, FNR and DEF.SEQ.

See also the section DDM Header Information.

SHOW EXTENDED FIELDS (ON/OFF) F14 Switches the display of the Extended Field Information section on the DDM editor screen on or off: see Specifying Extended Field Attributes.
EDIT EXTENDED FIELDS F15 Displays in edit mode the fields contained in the Extended Field Information section on the DDM editor screen: see Specifying Extended Field Attributes.
SHOW COUPLED FILES   Only applies to DDMs that refer to Adabas files.

Specifies that a file is physically coupled to this DDM. Files are coupled by using Adabas descriptors.

For further information on file coupling, refer to the Adabas documentation.

QUIT Menu

The QUIT menu options and equivalent F keys (if available) are explained in the following table:

Menu Option F Key Explanation
EXIT (with STOW) F3 Executes the STOW command (see COMMANDS Menu) and leaves the DDM editor.
QUIT (without STOW)   Leaves the DDM editor without saving any modifications and without executing the STOW command (see COMMANDS Menu).

Function-Key Assignments

The commands available with F keys are used as an alternative to the commands provided with DDM editor menus or line commands. In addition, the F keys provide help information on the commands and fields available in the DDM editor.

Start of instruction set To list all current F-key assignments

The following table lists all standard F-key assignments and equivalent menu options or line commands:

Function Key Explanation
F1 HELP

If pressed once, displays help information for the field at which the cursor is positioned.

If pressed twice, displays help information on the current F-key settings.

F2 CHOICE

Displays a selection window (if relevant) for the field at which the cursor is positioned. From this window, you can choose a value. If no selection option is available, the help information window appears instead.

F3 STOW + EXIT

Corresponds to EXIT (with STOW) in the QUIT menu.

F4 - F9
F4 - F9 are not displayed on the DDM editor screen because they can be reassigned to other keys. To display or change the current F-key settings, use the Function Keys option of the Services Profile menu described in the relevant section.

F4 - F9 correspond to the following line commands:

   
F4 Corresponds to the line command D.
F5 Corresponds to the line command I.
F6 Corresponds to the line commands X and Y.
F7 Corresponds to the line command H.
F8 Corresponds to the line command C.
F9 Corresponds to the line command M.
 
See also To copy or move a block of lines with F keys.
F10 STOW

Corresponds to STOW in the COMMANDS menu.

F11 CHECK

Corresponds to CHECK in the COMMANDS menu.

F12 DB-SHORT-NAMES

Toggle switch.

Adabas: Corresponds to DB-SHORT-NAMES (ON/OFF) in the MISC menu.

F13 Corresponds to MODIFY DDM-HEADER in the MISC menu.
F14 SHOW EXT FIELD or HIDE EXT FIELD

Toggle switch.

Corresponds to SHOW EXTENDED FIELDS (ON/OFF) in the MISC menu.

F15 EDIT EXT FIELD

Corresponds to EDIT EXTENDED FIELDS in the MISC menu.

Start of instruction setTo copy or move a block of lines with F keys

  1. Position the cursor in the first line of the block of lines to be copied, deleted or moved and press F6.

    The line is marked.

  2. Move down or up to the next or previous line by pressing DOWN-ARROW or UP-ARROW.

    Each additional line is marked.

  3. In the last line of the block of lines to be marked, press F6 to stop marking further lines.

  4. Position the cursor in the line above which you want to copy or move the block of lines and press F8 or F9.

Top of page

Specifying Extended Field Attributes

The extended field editing function provides the option to specify default field attributes for headers and edit masks as well as remarks to be applied when the field is used in another Natural object (for example, in a program).

The header attribute specifies the default column header to be displayed above the field when it is output, for example, with a DISPLAY statement. If no header is specified, the field name is used as column header.

The edit mask attribute specifies the default edit mask to be used when the field is output, for example, with a DISPLAY statement. The edit mask must conform with Natural syntax rules and be valid for the Natural data format and length of the field.

The remark attribute specifies a comment about the field.

Related Topics:

The section below covers the following topics:

Switching Extended Field Attributes On or Off

This section describes how to switch extended field attributes on or off.

Start of instruction setTo switch extended field attributes on or off

Editing Extended Field Attributes

The section below describes how to edit the field attributes contained in the Extended Field Information section of the DDM editor screen.

Start of instruction setTo edit the fields in the Extended Field Information section

Start of instruction setTo terminate editing with or without field modification

Top of page

Setting Editor Preferences - Services Profile

The Services Profile menu of DDM Services is used to display or change the DDM editor profile settings for the function (F) keys F4 to F9, and the display mode of the DB column.

Start of instruction setTo invoke Services Profile

This section contains information on the Services Profile menu options.

Function Keys

With the Function Keys option, you can reassign the keys F4 to F9. These F keys are used to execute line commands (see the relevant section) in the DDM editor.

Start of instruction setTo reassign an F key

  1. From the Services Profile menu, choose Function Keys.

    The Profile settings window appears with the current F-key assignments:

    +--- Profile settings ----+-
    ¦ Delete        F4        ¦ 
    ¦ Insert        F5        ¦ 
    ¦ Mark Block    F6        ¦ 
    ¦ Unmark Block  F7        ¦ 
    ¦ Copy          F8        ¦ 
    ¦ Move          F9        ¦ 
    +-------------------------+ 
    
  2. In the Profile settings window, position the cursor in the line of the function you want to reassign and press the F key to which you want to assign this function. You can only assign an F key that is not already assigned to any other DDM Services function.

    The new F key setting is displayed in the Profile settings window as shown in the example below:

    +--- Profile settings ----+
    ¦ Delete        F21       ¦
    ¦ Insert        F5        ¦
    ¦ Mark Block    F6        ¦
    ¦ Unmark Block  F7        ¦
    ¦ Copy          F8        ¦
    ¦ Move          F9        ¦
    +-------------------------+
    

Other Definitions

With the Other Definitions option, you can determine whether or not to display the DB column as described in Columns of Field Attributes.

Start of instruction setTo change the display mode of the DB column

  1. From the Services Profile menu, choose Other Definitions.

    The Profile settings window appears:

    +------- Profile settings -------+
    ¦ Display Database short names N ¦
    +--------------------------------+
    
  2. Replace the current value by Y (Yes) to display the DB column permanently, and N (No) to hide the column permanently.

Top of page