> For a consulting project we received a number of files in ADABAS
> format, which is written by a dbase program from a company called
> Software AG. Anybody have experience with this ? Is it ASCII or
> EBCDIC ? Can it be translated easily ? How badly is it wrapped in
> proprietary formats ?
The answer: it depends. Adabas runs on IBM mainframes (EBCDIC), as well
as OS/2, Unix, and VAX/VMS machines. Then, there are three possible
formats that the data can be in (which can vary by platform), depending on
the method used to create the data:
* ADABAS backup datasets. Created by Adabas' ADASAV or ADABCK utility,
these would be a real pain to read.
* Unloaded/compressed datasets. These are a little better. The first
record describes the records (each field has a two-character name, length,
format, etc.). The actual data is stored removing trailing blanks and
leading zeros, with numeric data stored in packed decimal (at least on the
mainframe). Null (empty) fields can be represented by a count of empty
fields. This format is not quite as bad as a save, but can still be some
amount of trouble to read.
* Decompressed datasets. These are the easiest. All fields are provided
one after another, by record, in a decompressed format. Only one
complication in this case: Adabas supports repeating fields, which can be
output with a count field (1-191 normally represented in a one-byte count
field). Otherwise, if they gave you a listing of the file format, turn it
into a C structure and you're set.
Ask them if they provided the data "in a decompressed format with a fixed
number of repeating fields". Also request the "ADAWAN/ADACMP/ADAFDU field
definitions for the file" which can be used to figure out how to read the
data. The format of these cards is something like this:
01,AA,10,A * Level-1 field name AA, 10 bytes alpha
01,AB,PE(10) * Start of a repeating field group, with 10 occurrances
02,AC,10,N * Unpacked numeric 10 bytes
02,AD,10,U * Also unpacked numeric 10 bytes
02,AE,10,P * Packed numeric
If they just sent you Adabas data (without description), either they are
making some very bad assumptions (i.e. they're just plain stupid), your
company lied to them about your Adabas experience, or they're testing you.
IT Specialist / System Programmer
Marathon Oil Company