hello softwareag team,
i want to ask how can i import data from a text file to the adabas because i just download the natural adabas package for windows and i want to create my own database and i have it in a text file because it contain large number of records
Since you are using Natural, the approach I would recommend is to write a Natural program that reads your text file as a work file and then stores the data to Adabas.
DEFINE DATA LOCAL
1 REDEFINE #IN-RECORD
1 MYFILE VIEW OF MYDDM
READ WORK 2 #IN-RECORD
MOVE #IN-FIELD-A TO FIELD-A
MOVE #IN-FIELD-B TO FIELD-B
STORE IN MYFILE
This simple approach works well if your data is in a fixed length format. Delimited data would be a little more complicated but not impossible.
There are utilities that can be used by a DBA to load the data into Adabas directly as well that is more efficient.
Both Natural and Adabas can process a CSV as input.
For Natural, use
- DEFINE WORK FILE n ‘filename’ TYPE “CSV”
For ADACMP, specify the delimiter