Defining an Import/Export Program

An import/export program lets you export data from a file in one database (data area/data ID), making it possible to import it to a file in another database (data area/data ID). The import/export program writes the data to an export file. You can import the data in this export file to another database using the Import An Export File utility (for more information, see the System Utilities Reference Guide).

In the import/export program, you can also define parameters and record selection conditions, making the program export only the records that satisfy these parameters and conditions. If you do not define parameters and conditions, the program exports all records in the file.

You can run an import/export program interpretively, or you can generate it into COBOL. You cannot paint a report for an import/export program.

To define an import/export program

  1. On the Program Definition form, select Import/Export in the Program Type field when defining the program. For instructions, see Defining Programs.
  2. Press Action (F8) and choose Paint.
  3. In the Primary Files window, select the primary file.
  4. On the Database Structure-Program Structure form, select any detail files whose data you want to export, and define any additional tasks. For instructions, see Defining a Detail fileand Defining Additional Tasks.
  5. Define any parameters and record selections to run the program against. For instructions, see Defining a Parameter Field and Defining a Report Record Selection.
  6. Press Exit to return to the Program Definition form.

    The system automatically adds the form IDs for any import/export programs you define to the Application Forms form.