Version 2.3.1
 —  Conversion  —

Conversion of the Data Structure - General Considerations

The operation of the Adabas Bridge for DL/I normally does not need any change of the original DL/I definitions. It is sufficient to convert these original DL/I definitions with the ADL Control Block Conversion (CBC) utilities as described in the section ADL Conversion Utilities for DBDs and PSBs in this documentation. The resulting Adabas file layout can be used without any further modification by DL/I or Natural applications through the ADL CALLDLI or ADL Consistency Interface respectively.

Nevertheless, it may be advantageous to depart from this "straightforward" method by introducing some modifications before, during and after the conversion. The section Managing ADL Files in the ADL Interfaces documentation describes the steps necessary to perform this modification.

The following section offers you details of the default Adabas file layout, as well as some hints on modifying the DL/I structures or the Adabas file layout.

This document covers the following topics:


Changes to DL/I Data Structures Prior to the Conversion

Before starting the conversion process, you should check whether any modifications to the DL/I definitions are desired. When the conversion is completed, some further change of the DL/I structures requires a time-consuming unload and reload of the data.

Top of page

Validating Segment Layouts and Data Types

For DL/I applications, the view of a segment is often not the same as defined in the original DL/I DBD. This is possible, because DL/I corresponds with the application program on a segment level, that means, it offers and accepts a whole segment, regardless of the field definitions. Therefore, a DL/I field can contain non-numeric data, even if it is defined as numeric. Since Adabas operates on a field level, problems can occur while loading such incorrect data.

On the other hand, DL/I fields can exist which are defined as alphanumeric but which contain only numeric data. The CBC utility converts such fields to alphanumeric Adabas fields and Adabas will not validate them for numeric contents. The same effect occurs for parts of a segment which correspond to no DL/I field definition, but which are subsequently used for numeric data.

Therefore, you are recommended to compare the segment layout of the DL/I definitions with the redefinitions (like copy-codes, copy-books) in the application programs. Remove all inconsistencies and include field definitions from the copy- codes into the DL/I DBD definition. You can add all field definitions or combine subsequent alphanumeric fields to form one large field. This is advantageous for the Adabas compression and for the developing of Natural applications as described later.

Note that additional field definitions in the DL/I DBD will not influence your DL/I applications, if the overall segment length is unchanged and you do not define a field as numeric which is supplied with non-numeric values. This is because ADL corresponds with the application program on a segment level like DL/I. But the data is stored with Adabas, and thus you will receive a non-zero response code if an inconsistency in the data type is detected.

Top of page

Optimization with Respect to Adabas Compression

Once the data is converted, it will be compressed by Adabas as described in the Adabas Utilities documentation. Because ADL defines all fields with the "NU" option for the Adabas compression utility ADACMP, the "null value suppression" will also be active.

If the converted data structures do not reflect the structures which are used by the application, the Adabas compression may not operate in an optimal way. Assume for example, there is a segment in a DL/I DBD with no field definitions specified. The application program may redefine this segment by splitting it up into five different parts. If the last part is filled with data, no compression can take place, even if the other four parts are empty.

Another failure of the Adabas compression can be an incorrectly defined field type. If a field contains numeric data but is defined as alphanumeric, it will not be compressed.

Thus, in order to optimize the Adabas compression, the converted data structures and types should reflect the usage in the application programs. This may be achieved by modifying the DL/I definitions prior to the conversion or by changing the Adabas file layout after the conversion.

Top of page

Adabas File Layout

The ADL Control Block Conversion offers you an automated way to convert DL/I data structures into an Adabas file layout. The following sections outline the default layout and how you can modify it:

Default Layout Generated by the ADL Conversion Utilities

The ADL Control Block Conversion (CBC) converts every element of a DL/I physical DBD into an element of an Adabas file. Additionally some fields are generated to reflect the hierarchical structure. The information about the other DL/I definitions, like PSBs, logical or secondary index DBDs, are kept in the ADL directory file. These structures do not have any influence on the Adabas file layout. The only exceptions are user data fields in index DBDs.

In the following, the translation of the different elements is described in detail:

An Adabas field has the same type and length as the corresponding DL/I field. Filler fields are always defined as alphanumeric. If an Adabas field would be longer than 253 bytes, it is split up. This arbitrary splitting up may result in problems for developing Natural applications. See the section Considerations for Natural/Adabas Applications later in this documentation on how to avoid these problems.

If a logical child segment contains no intersection data (in other words, no data apart from the DL/I concatenated key), no Adabas group for this segment will be generated at all. In fact, all information about this segment is kept in the ADL PCK fields.

Changing the Default Layout

The layout of an ADL file is primarily defined by the DL/I DBD definition. Thus, every modification of the DBD will alter the Adabas file layout.

During the CBC utility run, you can specify the "FNR" parameter with the GENSEG function. Then the segments will be distributed on different Adabas files. You may also specify the "ADANAME" parameter, in order to define the name of the Adabas group, which correspond to a DL/I segment type.

Once the DL/I data structures have been converted to Adabas, some changes are still possible:

For more information concerning the Adabas layout of an ADL file, see the section Managing ADL Files in the ADL Interfaces documentation.

Considerations for Natural / Adabas applications

Once the DL/I data structures are converted to Adabas, DDMs can be generated with SYSDDM or with Predict which are used by Natural applications. Because the incorporate functions of these tools use the Adabas layout, you should consider the DL/I structures before the conversion because this defines how the Adabas fields looks like.

As described earlier, a field which would be longer than 253 bytes is split up. This might cause problems for Natural applications, if for example this splitting is in the middle of a numeric value. Thus, you are recommended to force a splitting manually at a better place. This can be performed either by including additional DL/I field definitions into the DBD or by a reorganization of the Adabas fields inside the affected group.

Another reason for avoiding such long Adabas fields is the inflexibility of these fields. As described in the section Managing ADL Files in the ADL Interfaces documentation, it is easy to increase the size of a field as long as it does not exceed the maximum size of 253 bytes.

You can distribute the segments of a DL/I DBD into different Adabas files. This can be helpful if Natural programs have to identify segment data and segments with no sequence fields are involved. Splitting up the data into different files might also affect the Adabas performance, as described in the section Performance Considerations in the ADL Interfaces documentation.

If you are using Adabas FASTPATH and some of the segments in a DBD contain constant data, like tables, etc., you should also consider choosing another file number for these segments. Then Adabas FASTPATH can work in a more efficient way.

In order to access dependent segments with Natural applications, you may include descriptors and superdescriptors in the Adabas file. You can do that by adding an entry to the ADACMP cards which are produced by the ADL CBC utility. Once the data has been converted into the ADL file, you can use the Adabas ADAINV utility in order to generate descriptors, superdescriptors etc. Such a superdescriptor might consist of the PCKs of all parent segments and the sequence field of the segment to be accessed. If this segment does not have a sequence field, the superdescriptor would also return data of other segment types under the same parent. In order to avoid this, you can choose another file number during the CBC utility run for the affected segment.

Top of page