Using the DDM Editor

The DDM editor is organized in a table where the field definition data is contained in rows and columns. The editor provides a separate row for each field defined for a DDM. All attribute definitions that belong to a field are contained in the cells of this row.

You can add a new field to a DDM source or modify the attributes of an existing field by using one of the following methods:

  • Enter each attribute definition in the respective cell of a field row or replace existing definitions.

  • Copy fields from the current database file if available.

  • Copy fields within a DDM or from another DDM by using copy and paste functionality.

This section describes the columns contained in the DDM editor window and the functions provided to create or modify a DDM field, change the display of the DDM editor window, rearrange columns, or hide fields that are not required for a current editing operation.

Related Topics in the Using Natural Studio Documentation:


DDM Header Information

This section describes the fields contained in the DDM Header dialog box that are used to display and change the correlation between the database and the DDM.

The information contained in the DDM Header dialog box is similar to the information displayed in the status bar. For details on the status bar, refer to Status Bar in the Using Natural Studio documentation. You can switch the status bar on or off by setting the corresponding DDM editor option as described in the Using Natural Studio documentation.

Displaying and Modifying DDM Header Fields

Start of instruction set To display and modify DDM header fields

  1. In the active DDM editor window, choose DDM Header. from the DDM menu.

    Or:
    Choose the DDM Header toolbar button.

    The DDM Header dialog box appears with the name of the current DDM displayed at the top of the box:

    graphics/ddm_header.png

  2. From the Database ID combo box, choose an ID, or enter an ID in the box: see also Database ID in Explanation of DDM Header Fields.

    In the File ID text box, enter a new value: see also File ID in Explanation of DDM Header Fields.

    In the Default sequence text box (not applicable to Tamino), enter a short name as default sequence: see also Default sequence in Explanation of DDM Header Fields.

    For Tamino, the DDM Header dialog box also displays read-only doctype information as shown in the example below:

    graphics/ddm_header_tamino.png

  3. Choose OK to save the new values.

Explanation of DDM Header Fields

The fields contained in the DDM header are described in the following table. For the Tamino-specific doctype fields, see also Introducing Tamino XML Schema Language in the Programming Guide.

Header Field Description
Database ID

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 NATPARM parameter file is used.

File ID The number of the file being referenced in the database

The file number of a DDM from Tamino is always 1 and cannot be modified.

Valid range: 1 to 5000

DDM The name of the DDM currently contained in the work area of the DDM editor.
Default sequence Not applicable to Tamino.

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.

Type The type of database.
Collection Read-only Tamino-specific doctype information.

The name of the collection which is used within the Tamino database.

Schema Read-only Tamino-specific doctype information.

The name of the Tamino XML schema which is used within the Tamino database.

Doctype Read-only Tamino-specific doctype information.

The name of the doctype within the collection.

Namespace URI
Prefix

Read-only Tamino-specific doctype information.

The list of namespace URI/prefix pairs which corresponds to the doctype.

Using File Coupling

Only applies to Adabas.

You can use the File Coupling option to list or specify Adabas files that are physically coupled to a DDM.

Start of instruction setTo list or specify a coupled file

  1. In the active DDM editor window, from the DDM menu, choose File Coupling.

    Or:
    Choose the File Coupling toolbar button.

    The File Coupling dialog box appears as shown in the example below:

    graphics/ddm_coupling.png

    All files coupled to the current DDM are listed together with the short names of the descriptors used for coupling.

  2. In the File Name text box, enter the name of the file to be coupled to the DDM.

    In the File Number text box, enter the number of the file to be coupled to the DDM.

    In the From text box, enter the field short name, at which the file coupling begins.

    In the To text box, enter the field short name, at which the file coupling ends.

  3. Choose Insert to add the defined entry to the list box.

    Or:
    Choose Delete to remove the selected entry from the list box.

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

Columns of Field Attributes

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

The display of the columns depends on whether a column is relevant for the DDM being edited. For example, Tamino-specific information is not displayed for a DDM created from an Adabas database.

Column Heading Field Attribute
None
The indicator column is displayed in the leftmost section of the editor window. It can contain the following signs which appear next to the appropriate row:
   
An error sign which indicates incorrect syntax. You are then required to enter a valid value. A tool tip provides error information.
   
graphics/edis_info.png An information sign which warns you of potential problems caused by the value entered. A tool tip helps evaluate and eliminate the problem.
   
or A toggle key which indicates an expanded or a collapsed block of fields (see also Showing or Hiding Fields).
   
Type
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 Not applicable to Tamino.
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 Not applicable to Tamino.
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.
Level 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.

For Tamino: valid level numbers are 1 - 99.

Level numbers must be specified in consecutive ascending order.

Short Name Not applicable to Tamino.

The Short Name column displays the two-character short name of the corresponding field in the database file.

In a remote environment: The two-character code used for segment types in DL/I.

Creating Fields:

If you create a new DDM field and the display of the Short Name column is switched off, the DDM editor assigns to the new field a new 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 Insert function as described in Inserting and Modifying Fields.

Name The name of the field.

It can be 3 - 32 characters long for Adabas fields and 1 - 32 characters for SQL columns and Tamino doctypes.

In a remote environment on a mainframe platform, the name can be 1 - 19 characters long for DL/I fields.

The rules to create a name comply with the naming conventions for user-defined variables (see the Using Natural Studio 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.

For Tamino, the field name is not necessarily the same name as Tag Name (see Tamino-Specific Extended Field Attributes).

Format 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.

To modify the format of a field, see also the explanations in Inserting and Modifying Fields.

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.
Depending on the Natural data format selected from the Format drop-down list, the Length column is preset to one of the following values:
   
10 for formats A, B and U
4 for formats F and I
7 for formats N and P
6 for format D (standard value)
1 for format L (standard value)
12 for format T (standard value)
   

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

Suppression
Not applicable to Tamino.

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 Remarks text box (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.
Descriptor
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 Descriptor 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.

For a Tamino XML schema, an element is marked as a descriptor in the DDM when it has an overall multiplicity of a maximum of 1, in other words, if the maxOccurs values of the element and all of its predecessors in the schema are never greater than 1.

Descriptors types are:
   
blank No descriptor.
This field is not a descriptor.
   
A Only applies to a remote mainframe environment.
Indicates that the field is an alternate index for a VSAM file.
   
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 Not applicable to Tamino.
Hyperdescriptor.
A hyperdescriptor is a user exit in Adabas. For Natural, it provides the same functionality as a phonetic descriptor (see below).
See also Displaying Descriptor Information.
   
N Not applicable to Tamino.
Non-descriptor.
A non-descriptor is not a descriptor, but can be used as a search field for a non-descriptor search.
   
P Not applicable to Tamino.
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.
See also Displaying Descriptor Information.
   
S Not applicable to Tamino.
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.
See also Displaying Descriptor Information.
   
X Only applies to a remote mainframe environment.
Alternate subdescriptor or superdescriptor; that is, an alternate index for a VSAM file.
 
Header The header to be produced for each field specified in a DISPLAY statement: see Specifying Extended Field Attributes.
Edit Mask The edit mask to be used: see Specifying Extended Field Attributes.
Remarks A comment which applies to a field and/or the DDM.
Tag Name Tamino-specific information as described in Tamino-Specific Extended Field Attributes.
XPath
Occurrence
Flags
Default Value
Fixed Value
SQLTYPE SQL-specific information as described in SQL-Specific Extended Field Attributes.

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.

  • An L@xxxxx field is automatically added for every variable length field, where xxxxx is the name of the related field.

    This applies to long alpha (LA) and large object (LB) fields in an Adabas file.

    If the length indicator relates to an LA, LB or LOB field, the Natural data format/length must be I4. For a VARCHAR field, the format/length must be I2.

  • An N@xxxxx field is automatically added for a field that may contain a NULL value, where xxxxx is the name of the related field.

    This applies to Adabas fields defined with the SQL Null Value Option. The Natural data format/length of a NULL indicator field must be I2.

Selecting Fields or Field Attributes

Before you perform an editor function, you select (highlight) the row or row cell where you want to create, modify or delete a field.

Selecting Single Fields

Start of instruction setTo select a single field if a cell is selected

  • Press SHIFT+SPACEBAR.

    The field row of the cell is selected.

    Or:
    Click on the leftmost column of the field row you want to select.

    The specified field row is selected.

Start of instruction setTo select a single field if a row is selected

  • Click on the field row you want to select.

    Or:
    Navigate to the field row you want to select by pressing UP-ARROW, DOWN-ARROW, HOME or END.

    The specified field row is selected.

Selecting Multiple Fields

Start of instruction setTo select a range of fields if a cell is selected

  1. Press SHIFT+SPACEBAR.

    The field row of the cell is selected.

    Or:
    Click on the leftmost column of the first field row in the range.

    The specified field row is selected.

  2. Hold down SHIFT while you select the row of the last field in the range.

    The rows of the specified field range are selected.

Start of instruction setTo select a range of fields if a row is selected

  1. Click on the leftmost column of the first field row in the range.

    Or:
    Navigate to the first field row in the range by pressing UP-ARROW, DOWN-ARROW, HOME or END.

    The first field row in the range is selected.

  2. Hold down SHIFT while you select the row of the last field in the range.

    The rows of the specified field range are selected.

Start of instruction setTo select all fields

  • From the Edit menu, choose Select All.

    Or:
    Choose the Select All toolbar button.

    Or:
    Press CTRL+A.

    All field rows contained in the current DDM source are selected.

Selecting Field Attributes

Start of instruction setTo select a field attribute if a cell is selected

  • Click on the row cell where you want to add or modify an attribute.

    Or:
    Navigate to the row cell where you want to add or modify an attribute by pressing TAB, SHIFT+TAB, UP-ARROW, DOWN-ARROW, LEFT-ARROW, RIGHT-ARROW, HOME or END.

    The specified row cell is selected.

Start of instruction setTo select a field attribute if a row is selected

  • Press F2.

    The leftmost cell of the field row is selected.

    Or:
    First, click on the row that contains the cell you want to select and then click on the cell where you want to add or modify an attribute.

    The specified row cell is selected.

Inserting and Modifying Fields

This section provides instructions for adding fields into a DDM source or modifying fields within a DDM source.

Start of instruction setTo insert a field from the current database file

  1. Select the row where you want to place the new field.

    The insert position (before or after the selected field) of the new field depends on the current setting of:

    • The Insert After On/Off toolbar button.

    • The Insert before/Insert after editor option (see: DDM Editor Options in the Using Natural Studio documentation).

  2. From the Field menu, choose Insert.

    Or:
    Choose the Insert Field toolbar button.

    Or:
    Select a row and press INS, or select a cell in the last row and press DOWN-ARROW.

    • If you are editing a DDM that references fields in the database file, the Field Selection List dialog box appears as shown in the example below:

      graphics/ddm_fields.png

      From the Field Selection List dialog box, select a field.

      The new field is pasted into the DDM source either before or after the field selected in Step 1.

    • If you are editing a DDM that cannot reference the corresponding fields in the database file, a blank row is inserted before or after the selected field.

      Note:
      You cannot validate new field attributes if the database is not available. See also the Creating Fields note for column Short Name in the section Field Attribute Definitions.

  3. In any blank row cell, you can enter a value for the field attribute to be added or choose a value from a selection box depending on the type of field you want to define.

When you insert a field of the type group or periodic group, the level of each subsequent field is automatically incremented properly.

Start of instruction setTo modify a field

  • Select the row cell that contains the field attribute definition you want to change and either overwrite the existing value or choose a value from a selection box.

    When you modify the level of a field of the type group or periodic group, the level of each subsequent field is automatically incremented or decremented properly, depending on the new level value.

    When you modify the Natural data format of a field, the current length is kept if it is also valid for the new data format. Otherwise, the current length specification is automatically replaced by a valid default length (see also the description of the Length column).

Copying, Cutting and Pasting Fields

The copy/cut and paste functions of the DDM editor are used to copy, move or delete one or more fields within the current DDM source or between different DDM sources.

Start of instruction setTo copy or cut and paste fields

  1. Select the fields to be copied or cut.

  2. From the Edit menu, choose Copy or Cut.

    Or:
    Choose the Copy or Cut toolbar button.

    Or:
    Press CTRL+C or CTRL+X.

    The fields are placed on the clipboard and can be pasted into the current DDM source or in another DDM source.

  3. If the fields are to be pasted into another DDM, open the appropriate DDM source.

  4. Select the field before or after which the copied or cut fields are to be pasted (see also the insert position in To insert a field).

  5. From the Edit menu, choose Paste.

    Or:
    Choose the Paste toolbar button.

    Or:
    Press CTRL+V.

    The copied or cut fields are pasted into the current DDM source at the specified position.

  6. To paste the same fields again, repeat Steps 3 through 5.

When you cut or paste a field of the type group or periodic group, the level of each subsequent field is automatically adjusted properly.

Finding and Replacing Field Names

The search function is used to search for field names and replace field names in the current DDM source.

The find function is performed on all data definitions including collapsed blocks of fields (see also Showing or Hiding Fields).

Caution:
There is no undo function available to restore original names.

Start of instruction setTo search for a DDM field name

  1. From the Edit menu, choose Find.

    Or:
    Choose the graphics/edis_find.png Find toolbar button.

    Or:
    Press CTRL+F.

    The Find DDM Field dialog box appears as shown in the example below:

    graphics/ddm_find.png

  2. In the Find field name text box, enter the long name of the field for which to search (in the example above: PERSONNEL-ID).

    Set the Match whole words only check box if you want to find whole field names only and not parts of field names. If the box is not set, all instances of the search string will be found.

    In the Direction section, set the option button Up or Down to specify whether the search is to be performed from the cursor position to the end of the DDM source or from the cursor position to the beginning of the DDM source. The default setting is Down.

  3. Choose Find Next.

    If no instance of the search string is found, an appropriate message is displayed.

    If an instance of the search string is found, it will be selected.

  4. To search for additional instances of the search string:

    from the Edit menu, choose Find Next.

    Or:
    Press F3.

    Or:
    Choose the Find Next toolbar button.

Start of instruction setTo replace a field name

  1. From the Edit menu, choose Replace.

    Or:
    Choose the Replace toolbar button.

    Or:
    Press CTRL+H.

    The Replace DDM Field dialog box appears as shown in the example below:

    graphics/ddm_replace.png

  2. In the Find field name text box, enter a search string.

    In the Replace with text box, enter a replacement string.

    Set the Match whole words only check box if you want to find whole field names only and not parts of field names. If the box is not set, all instances of the search string will be found.

    In the Direction section, set the option button Up or Down to specify whether the search is to be performed from the cursor position to the end of the DDM source or from the cursor position to the beginning of the DDM source. The default setting is Down.

  3. Choose Replace to replace the next hit found in the source.

    Choose Find Next and Replace to find the next hit and replace it.

    Or:
    Choose the Find Next and Replace toolbar buttons.

    Or:
    Choose Replace Next to replace the next hit found without selecting the hit first.

    Or:
    Choose Replace All to replace all search strings found.

    If no instance of the search string is found, an appropriate message is displayed.

  4. Choose Close to exit the dialog box.

Deleting Fields

When a field is deleted, it is cut from the DDM source but is not placed on the clipboard. Once deleted, the field can no longer be recovered.

Start of instruction setTo delete fields from the DDM editor

  1. Select the field(s) you want to delete.

  2. From the Edit menu, choose Delete.

    Or:
    Choose the Delete toolbar button.

    Or:
    Press DEL.

    The fields are deleted from the DDM source and cannot be recovered.

When you delete a field of the type group or periodic group, the level of each subsequent field is automatically decremented properly.

Rearranging Columns

In the editor window, you can adjust the display of the DDM to your needs by resizing, moving or hiding columns that are not required for an editing operation in the current DDM.

Resizing Columns

You can automatically adjust a single column or all columns to the best size, or change the width of a single column to a specific size.

Start of instruction setTo resize all columns to best fit

  • Choose one of the following methods:

    • Select a field as described in Selecting Single Fields.

    • From the View menu, choose Customize Columns.

      Or:
      In any column heading, click the right mouse button and choose Customize Columns from the context menu.

      The Customize Columns dialog box appears.

    • Select the Best Fit check box. This option is not selected by default.

    All columns in the active editor window are automatically resized to the size that best fits into the editor window whereby the column headings always remain visible.

    Or:
    Press CTRL+PLUS.

    Or:
    If you want to apply Best Fit to all active editor windows, set the corresponding editor option described in DDM Editor Options in the Using Natural Studio documentation.

Start of instruction setTo resize all columns to best fit while typing in text

  1. Open the Customize Columns dialog box as described in To resize all columns to best fit.

  2. Select the Best Fit check box and, additionally, select the Auto Fit check box.

    Each column in the active editor window is then automatically adjusted to fit the text you type in a row cell or a Definition dialog box when you leave the column or dialog box respectively.

    Or:
    If you want to apply Best Fit and Auto Fit to all active editor windows, set the corresponding editor options described in DDM Editor Options in the Using Natural Studio documentation.

Start of instruction setTo resize a single column to fit the contents

  • In the heading of the column you want to change, place the pointer over the right border. When the pointer changes to a divider, double-click on the border between the column headings. Note that you cannot resize the leftmost column.

    The column is automatically adjusted to fit its contents.

Start of instruction setTo resize a single column to a specific size

  • In the heading of the column you want to change, place the pointer over the right border. When the pointer changes to a divider, drag the divider to the width you require. Note that you cannot resize the leftmost column.

    The width of the column has changed to the specified size.

Start of instruction setTo save a resized table layout

  • Open the Customize Columns dialog box as described in To resize all columns to best fit and choose one of the following buttons.

    • OK saves the new table layout for the current editor session.

    • Save Layout saves the new layout in your user profile and retains it for future editor sessions.

    • Restore Layout overwrites the current layout with the layout previously saved in the user profile. Choose OK to save this layout.

    • Restore Defaults followed by OK overwrites the layout saved in the user profile with the default layout initially provided by the editor. Choose OK to save this layout.

    Or:
    In the editing area of the editor window, press CTRL+ALT+L.

    The new layout is saved in your user profile and retained for future editor sessions.

Moving Columns

You can change the table layout by moving single or multiple columns.

Start of instruction setTo move a column

  1. Choose one of the following methods:

    • Select a field as described in Selecting Single Fields.

    • Open the Customize Columns dialog as described in To resize all columns to best fit.

    • From the Displayed Columns list box, select the columns you want to move and choose Move Up or Move Down (if required repeatedly) until the columns have reached the target position.

      The top-to-bottom order of the list box corresponds to the left-to-right of the table in the editor window, that is, the top list column corresponds to the leftmost table column.

    Or:

    • Drag the column heading you want to move and drop it in the position required. Note that you cannot move the leftmost column.

    • Open the Customize Columns dialog box as described in To resize all columns to best fit.

  2. To keep the new table layout, proceed as described in To save a resized table layout.

Hiding or Displaying Columns

You can change the table layout by hiding or displaying columns.

Start of instruction setTo hide a column by rearranging the display order

  1. Select a field as described in Selecting Single Fields.

  2. Open the Customize Columns dialog box as described in To resize all columns to best fit.

  3. From the Displayed Columns list box, select the columns you want to hide.

    The top-to-bottom order of the list box corresponds to the left-to-right of the table in the editor window, that is, the top list column corresponds to the leftmost table column.

    Note:
    You cannot select Type, Level, Name, Format and Length which are mandatory for the table layout.

  4. Choose Remove.

    The selected columns are removed from Displayed Columns and appear in the Hidden Columns list box.

  5. To keep the new table layout, proceed as described in To save a resized table layout.

Start of instruction setTo hide a column by moving column borders

  1. In the heading of the column you want to hide, place the pointer over the right border. When the pointer changes to a divider, drag the divider to the left border until the column heading is completely invisible (right and left border lines must coincide).

    Note:
    You cannot hide the columns Type, Level, Name, Format and Length which are mandatory for the table layout.

    The hidden column then appears in the Hidden Columns list box of the Customize Columns dialog box.

  2. To keep the new table layout, proceed as described in To save a resized table layout.

Start of instruction setTo display a hidden column

  1. Select a field as described in Selecting Single Fields.

  2. Open the Customize Columns dialog box as described in To resize all columns to best fit.

  3. From the Hidden Columns list box, select the columns you want to display in the editor window.

  4. Choose Add.

    The selected columns are removed from Hidden Columns and appear in the Displayed Columns list box.

  5. To keep the new table layout, proceed as described in To save a resized table layout.

Showing or Hiding Fields

You can show (expand) or hide (collapse) blocks of fields to improve readability and maintainability of DDMs with complex data structures. When a block of fields is collapsed, all fields contained in this block are hidden, including any other nested blocks if they are part of the chosen block. Hidden blocks retain their collapsed or expanded state.

Blocks that can be expanded or collapsed are blocks of fields that are defined for the same field level (1 to 99). Blocks are expanded or collapsed by the hierarchy of levels, from highest level 1 to lowest level 99. A block that contains fields from a lower-ranking level is contained in a block from a higher level.

When scanning field definitions (see also Finding and Replacing Fields), collapsed blocks are also scanned.

If you want to expand and collapse blocks of fields, you need to set the appropriate editor option referenced in the instructions below.

Start of instruction setTo expand and collapse single blocks

  1. Set the Expand/Collapse editor option as described in DDM Editor Options in the Using Natural Studio documentation.

    When the Expand/Collapse option is set, an expand or a collapse toggle ( or ) appears as shown in the example below:

    graphics/ddm_expand.png

    The toggle indicates the first row of a collapsed block.

    The toggle indicates the first row of an expanded block.

  2. Click on a toggle to expand a block or click on a toggle to collapse a block.

    Or:
    Position the cursor in a row that contains a or toggle and, from the View menu, choose Expand/Collapse or choose the graphics/edis_expand_collapse.png Expand/Collapse toolbar button.

    Or:
    Use any of the shortcut keys listed in Shortcut Keys in the Using Natural Studio documentation.

Start of instruction setTo expand or collapse all blocks

  • From the View menu, choose Expand All or Collapse All.

    Or:
    Choose the graphics/edis_expand_all.png Expand All or the graphics/edis_collapse_all.png Collapse All toolbar button.

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.

For Tamino, the extended field editing function also provides additional Tamino-specific information.

Related Topics:

The section below covers the following topics:

Extended Field Attributes

This section describes how to display and edit the extended attributes of the fields contained in the current DDM.

Start of instruction setTo display and edit extended field attributes

  1. In the active DDM editor window, select a field.

  2. From the Field or context menu, choose Extended Attributes.

    Or:
    Choose the Extended Attributes toolbar button.

    The Extended Attributes dialog box appears with the name of the selected field as shown in the example below:

    graphics/ddm_extended.png

    If a header exists for the selected field, it is displayed in the Header text box. You can edit the header, or add a header if none exists.

    If an edit mask exists for the selected field, it appears in the Edit mask text box. You can modify the edit mask, or add an edit mask if none exists.

    If a remark exists for the selected field, it appears in the Remarks text box. You can edit the remark, or add a remark if none exists.

    For Tamino, Tamino-specific extended field attributes are displayed as shown in the example below:

    graphics/ddm_extended_tamino.png

  3. Choose Save to save and validate any changes you have made for the current field.

    Choose Next to view and edit extended attributes for the next field in the DDM source.

    Or:
    Choose Prev to view and edit extended attributes for the previous field in the DDM source.

    (Commentary fields identified with an asterisk (*) are skipped.)

  4. Choose OK to save and validate all field modifications.

    The DDM editor window appears.

Tamino-Specific Extended Field Attributes

Tamino-specific extended field attributes are extracted from Tamino XML schema definitions.

In addition to the text boxes Header, Edit Mask and Remarks, the following read-only Tamino-specific attributes are displayed in the Extended Attributes dialog box:

Attribute Function
Tag Name The name of the field within a Tamino doctype.

This name may be not unique within the whole XML document. Some group fields might not have a Tag Name.

XPath The complete XPATH that references a field within a Tamino doctype.

XPATH information is used during application runtime to uniquely identify a data element in a given XML document. Therefore, it is not possible to change the XPATH information.

Some group fields might not have an XPATH.

Occurrence The minimum and maximum numbers of occurrences.

In Tamino, the multiplicity of the field as extracted from the Tamino XML schema. The multiplicity of a field is expressed with the maxOccurs facet in the Tamino XML schema.

Flags
The flags represent the hierarchical field structure within a Tamino group structure. They are used internally to help in correctly recognizing special group structures (that is, the attributes of an element tag) or multiple occurrences. Additionally, the user can identify DDM fields which are either mandatory or optional in XML documents.

Combinations of the flags for one field are possible.

The following flags can be displayed:

   
ARRAY Field is an array; that is, maxOccurs is greater than 1.
   
GROUP_ATTRIBUTES Field is a group that contains the attribute sub-fields of the predecessor field.
   
GROUP_ALTERNATIVES Field is a group that represents the choice constructor; the choice elements are contained as sub-fields.
   
GROUP_SEQUENCE Field is a group that represents the sequence constructor; the sequence elements are contained as sub-fields.
   
GROUP_ALL Field is a group that represents all constructors; all elements are contained as sub-fields.
   
ATTR_REQUIRED Field is an attribute marked as required.
   
ATTR_OPTIONAL Field is an attribute marked as optional.
   
ATTR_PROHIBITED Field is an attribute marked as prohibited.
   
MULT_OPTIONAL Field can occur in the XML document but does not need to.
   
MULT_REQUIRED Field must occur in the XML document.
   
MULT_ONCE Field must occur exactly once in the XML document.
   
SIMPLE_CONTENT Field was defined as complexType with simpleContent.
Default Value The default value assigned to the field; this attribute is not yet used.
Fixed Value The fixed value assigned to the field; this attribute is not yet used.

SQL-Specific Extended Field Attributes

In addition to the text boxes Header, Edit Mask and Remarks, the following read-only SQL-specific attribute is displayed in the Extended Attributes dialog box:

Attribute Function
SQLTYPE Information generated from the data types BLOB (Binary Large Object) or CLOB (Character Large Object) if contained in an Oracle database.

Extended Field Attributes in a Remote Mainframe Environment

Only applies to DDMs generated from VSAM files.

This section describes how to display and edit the extended field attributes of a DDM generated from a VSAM file.

Related Topic:

Extended Editing at Field Level - Natural for VSAM documentation.

Start of instruction setTo display and edit extended field attributes

  1. In the active DDM editor window, select a field.

  2. From the Field menu, choose Extended Attributes.

    Or:
    Choose the Extended Attributes toolbar button.

    The Extended Attributes dialog box appears with the name of the selected (current) field indicated at the top of the window as shown in the example below:

    graphics/ddm_extended_vsam.png

  3. If a header exists for the selected field, it is displayed in the Header text box. You can modify the header, or add a header if none exists.

    If an edit mask exists for the selected field, it appears in the Edit mask text box. You can modify the edit mask, or add an edit mask if none exists.

    If a remark exists for the selected field, it appears in the Remarks text box. You can modify the remark, or add a remark if none exists.

    If an alternate descriptor (Type A) or superdescriptor (Type X) is defined for the field, you can enter an alternative index name.

    If the field is a multiple or periodic group field, you can specify the number of occurrences in the Maximum Occurrence text box.

    If an alternate descriptor (Type A) or superdescriptor (Type X) is defined for the field, you can set the flags Upgrade, Unique Key, Sort and Null.

    If the field has a primary or secondary key descriptor (Type A) or superdescriptor (Type X), you can select the field short name from the Redefinition of field combo box.

  4. Choose Save to save and validate any changes you have made for the current field.

    Choose Next to view and edit extended attributes for the next field in the DDM source.

    Or:
    Choose Prev to view and edit extended attributes for the previous field in the DDM source.

    (Commentary fields identified with an asterisk (*) are skipped.)

  5. Choose OK to save and validate all field modifications.

    The DDM editor window appears.

Displaying Descriptor Information

Only applies to Adabas.

This section describes how to display the definition of a descriptor of type H (hyperdescriptor), P (phonetic descriptor) or S (subdescriptor or superdescriptor). For further information on descriptors, see Descriptor in the section Columns of Field Attributes.

Start of instruction setTo display descriptor definition

  1. In the DDM editor window, select the row or row cell that contains S, P or H.

  2. From the Field or context menu, choose Descriptor Information.

    Or:
    Choose the Descriptor Information toolbar button.

    The Descriptor Information dialog box appears as shown in the example below:

    graphics/ddm_descriptor.png

    The definition of the descriptor is displayed (in the example above: DEPT and NAME) next to Field Name and the field offsets are displayed next to Begin and End.

  3. Choose OK to exit the Descriptor Information dialog box.