1

I am trying to make sense of Adabas Natural DDMs. Mostly it makes sense but explanations of certain specifics are hard to come by.

The Files start off with something like:

00101DB: 000  FILE: 015  - Z-NATDIC-PR  DEFAULT SEQUENCE:
0020
0030TYL  DB  NAME                              F LENG  S D REMARKS
0040---  --  --------------------------------  - ----  - -  ------------------------

which is all good and well. But what does it mean if lines similar to those appear multiple times within the same DDM?

For example, the excerpt above comes from a DDM that also contains:

03001DB: 255  FILE: 253  - Z-NATDIC-PR  DEFAULT SEQUENCE:
0310
0320TYL  DB  NAME                              F LENG  S D REMARKS
0330---  --  --------------------------------  - ----  - -  ------------------------

...

05901DB: 255  FILE: 253  - Z-NATDIC-PR  DEFAULT SEQUENCE:
0600
0610TYL  DB  NAME                              F LENG  S D REMARKS
0620---  --  --------------------------------  - ----  - -  ------------------------

...

08901DB: 255  FILE: 253  - Z-NATDIC-PR  DEFAULT SEQUENCE:
0900
0910TYL  DB  NAME                              F LENG  S D REMARKS
0920---  --  --------------------------------  - ----  - -  ------------------------

My understanding is:

  • a DDM exists to define a user-friendly way of referring to fields for a single Adabas file (kinda like an SQL table)
  • A default sequence defines the order of a bunch of fields (analogous to SQL columns)

I need clarification:

  • What is the purpose of a default sequence?
  • what does it mean if there are multiple default sequences within a single DDM?
LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
Sheena
  • 15,590
  • 14
  • 75
  • 113

3 Answers3

0

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.

Carl
  • 24
  • 1
0

Sheena, it is sorted in the Adabas short name sequence. I believe it is to order your fields at a later stage on the logical view, for instance if you want to add a postal code at the end of an address field later on. Adabas, always puts the field at the end of the file, if you use a short name in between address line 4 and the next field you can add the postal code there. In my 21 years of working with natural you are the first to ask this question :-)

Carl
  • 24
  • 1
0

As Carl mentioned, in the DDM-Editor a list of valid short names may be shown as a completion aid.
However that doesn't explain what the value is used for.
The above is documented under "Using the DDM Editor" in the current Natural documentation.

If you take a look in the Natural Programming Guide, under...
"Accessing Data in an Adabas Database"
...how its used is explained.

To access Adabas data in logical order with Natural you might code the following:

READ view LOGICAL BY descriptor

(that corresponds to Select/Order by in SQL)

It is however also possible to omit descriptor and code the following:

READ view LOGICAL

In that case the data will be read in the order specified by Default Sequence.
(this is also discussed in the Natural documentation of the READ statement)

In my 35 years or so working with Adabas & Natural at Software AG and customers I've never seen this field used. Its usually left blank.

Dave The Dane
  • 650
  • 1
  • 7
  • 18