Adabas does not provide the capability to work with long names for fields. In order to use long names in Java applications, you first have to create a map file with the Adabas Data Designer.
The Adabas Data Designer is based on the Eclipse RCP and it's purpose is to:
Create views, which can be used to browse through Adabas data and read FDT information.
Create map definitions that contain long names instead of the two character short names of Adabas.
The map files are stored as separate Adabas files independently from the associated FDTs; they can also be in a separate database with a different database ID.
Note:
One database can only contain one mapping file (named
Data_Designer), but as many mappings as required. You can also have multiple
mappings for one file. Please be aware that changing, e.g. renaming, deleting
or reloading with different entries, will not change the mapping; in this case,
it might be necessary to recreate the mapping.
The Data Designer is a Java rich client and uses Java 8 technology.
The required Java 8 runtime environment will be installed by the Software AG
Installer. Please ensure that you set the correct environment e.g. by sourcing
the "sagenv.new" file from the bin subdirectory of your installation, before
you start the Designer for the first time. The Data Designer is started by
calling the program AdabasDataDesigner
program on
Unix/Linux platforms. On Windows platforms, choose Software
AG->Tools->Adabas Client for
Java->Start the Adabas Data Designer from
the .
Note:
On Windows, this will start the Adabas Data Designer Console in
the background as a separate DOS box. Please don't close this DOS box,
otherwise this will terminate the Adabas Data Designer application as
well.
If any local databases are active, the Designer will display them in the left tree view Databases. Open a view of the database by either double clicking on the database or by choosing the context menu
. You can display a list of loaded files by expanding the database tree view.You can display the File Definition and the Adabas Data of an Adabas file by double clicking on the specific file in the Databases tree view or by choosing
in the context menu.You can browse any field of the Adabas file by selecting it in the "File Definition and Data" view. Exceptions are fields of phonetic descriptors and referential integrity. For super descriptors, the appropriate subfields are displayed. You can search for a field using
, which is especially useful for long FDTs.The amount of data can be restricted either by using a start offset (ISN), specifying the number of records to be read or by using a filter for the contents of a specific field.
Adabas does not support the capability to work with long names. In order to use long names in Java applications, you need to create a map file first. Using maps in a Java application hides the "classic" Adabas database ID/file number combination, i.e. Java applications can be developed without further knowledge about the DBID or FNR information.
The Data Designer provides two ways to create a map file:
Create a map file definition for an existing Adabas file already loaded into the database:
Add map definitions by hand;
Load definitions from an external file.
Create a map definition in combination with a new Adabas file definition table:
Add map and field definitions by hand;
Load the map and Adabas field definitions from an external file.
The create map dialog provides different possibilities to add a map definition to an existing file.
To add a map to an existing file
Choose
from the context menu of an existing file.The file and the database will be preselected in the following dialog. There are now several data sources possible for the map definition: an Adabas ADAFDU input file with appropriate comments (see the examples files in the demodb subdirectory of Adabas), a DDM exported from Natural,or you can interactively add the definitions in the subsequent dialogs (free hand map). The following extract from the emp.fdt file shows the syntax for comments in the FDT file, which are then read and converted by the Data Designer into long names:
1 , A0 ; personnel-data 2 , AA , 8 , A , DE,NC,NN,UQ ; personnel-id 2 , AB ; id-data 3 , AC , 4 , F , DE ; personnel-no 3 , AD , 8 , B , NU,HF ; id-card 3 , AE , 0 , A , LA,NU,NV,NB ; signature
Important:
Select the database and file where the new map
definitions are to be stored. This can be the same database as files for which
the maps are defined, or it can be any other database.
After you have selected the source, the next dialog provides the possibility of adding/changing long names for the FDT.
Notes:
The dialog for creating a so-called free hand map for an existing Adabas file is similar to the one shown above.
Click on the button
to complete the map definition.Select the database and file specified for the maps and double click, or open the Data Browser via the context menu. All fields that are defined in the map with long names are shown, and can be used for browsing the data.
There are two ways in which you can create a new Adabas file with the Data Designer:
Choose
from the dialog;Import a file definition from an existing file, such as an XML schema or an Adabas FDT file. Choose Import file or new->file from the context menu.
You can use the following dialog to create a new FDT and the related mapping.
Click the Field entry editor:
button to add fields to the FDT, and a default entry for the field will be added. All types and options can be changed in theTo add a group or periodic group, choose the appropriate type from the dialog and then add the fields to the group.
Choose the appropriate parent field from the drop down box Parent Group Field. Existing fields can be changed to be part of a group.
To add a sub- or super descriptor, click the
button. Select the field that should be added and specify the length and click the button.Note:
It is not possible to modify fields that have already been
added. In order to change the descriptor, it is necessary to cancel the dialog
first and then add the descriptor again.
This new file dialog supports two different file formats to load a definition from a file and create a new Adabas file with the corresponding map definitions:
An Adabas ADAFDU input file;
An XML schema file.
The next dialog shows all fields and can be used to change the field definitions as required.
Choose whether to create a map definition and where to store it.