Home page  
Help >
DDL File Import and Export
Version 7.11
DDL File Import and Export File Import and Export

Record Descriptions (RDs) are used to accomplish file import and export.

Suppose you have several existing files of data and you want to create a data base and populate it with some or all of the data in these files.

Questions arise.

Do the Table descriptions in the database have to be exact replicas of the existing file formats? Am I restricted at database design time by existing file formats?

The answers are no. Record Descriptions provide a more flexible way of data extraction, conversion, and transfer.

LOAD and UNLOAD are the file import and export commands. Both of these commands have a Record Description name (rdname) as part of their syntax:

LOAD tablename rdname filename
UNLOAD collection tablename rdname filename

Where the file to be transfered is an exact replica of a Table, an asterisk (*) can be used in place of the "rdname."

Most of the time the files are not exact replicas. Then, "rdname" refers to an RD that you put in your Application Interface (AI).

Once a database exists, AIs for it can be compiled and recompiled at any time. As requirements come up for importing or exporting files, simply add an RD to a source text AI file and recompile it.

Record Descriptions

A Record Description describes the appearance of an external file. With the RD, we can LOAD data into the database from an external file, or we can UNLOAD data from the database creating (or adding to) an external file.

The Record Description syntax is:

RD rdname [file-type]
data-description-statement
:
data-description-statement

RD clause

The RD clause names the Record Description and determines the file type. The "rdname" is used in the LOAD and UNLOAD commands.

Data Description Statements

The data definition statements depend on the file type. Examples occur in each of the import/export discussions below.

Currently, the file types supported are: DIF
ASCII Delimited
ASCII
DBF
Binary and/or Blocked

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.