Search code examples
nosqladabas

significance of DEFAULT SEQUENCE in Adabas Natural DDM


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?

Solution

  • 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 :-)