Preparing the Unload Job window

An unload job is a collection of the specific pieces of information that are required to move data from a database into a data file. The Unload Job window shows a flowchart that includes all of the components of an unload job. You can use the Generate option to create the components of the unload job and to complete the items on the Unload Job window.

About this task

The generate example uses the Generate option to unload the contents of the items table of the stores_demo database into a file named /work/items_out. For instructions on how to create the stores_demo database and other demonstration databases, see the Informix® DB-Access User's Guide.

To generate the unload job:

Procedure

  1. Choose Jobs > Unload from the HPL window.
    The Unload Job Select window appears, as the following figure shows.
    Figure 1: The Unload Job Select window

    begin figure description - This figure is described in the surrounding text. - end figure description
  2. Click Create in the Selection Type group.
  3. Choose a name for the unload job and type it in the Job Name text box.
    This example uses the name unld.
  4. Click OK.
    The Unload Job window appears, as the following figure shows. The information box in the upper right part of the display shows the name of the unload job, the name of the database server where the onpload database is stored, and the name of the database server where ipload is running.
    Figure 2: The Unload Job window

    begin figure description - This figure is described in the surrounding text. - end figure description
  5. Click the Generate button.

    The Autogenerate Unload Components window appears. The Autogenerate Unload Components window shows the completed window.

  6. Click Table.

    You can unload an entire database table or only selected records from the table. Table indicates that you want to unload the entire table. Query indicates that you want to unload selected records.

  7. Type stores_demo in the Database text box.

    For this step and steps 8 and 10, you can click the down arrow to the right of the text box and select the entry from a selection list. A partially completed Load Record Maps window with an open selection list shows an example of a selection list.

  8. Type items in the Table text box.
    Figure 3: The Autogenerate Unload Components window

    begin figure description - This figure is described in the surrounding text. - end figure description
  9. Click File.

    File indicates that you want to type the name of a file. If you choose Device Array, you must type the name of an existing device array.

  10. Type the full path name of the file that will store the unloaded data. This file can be in any directory to which you have write access.
  11. Click OK.

Results

The Generate option creates the Query, Format, and Map components for the unload job and completes the Unload Job window. These components are all named unld. The Generate option also creates a device array named unld and puts the file that you specified (/work/items_out) into that array.
Tip: After you finish this exercise, you can choose Components > Devices from the HPL window and examine the unld device array.
The following figure shows the Unload Job window as completed by the Generate option.
Figure 4: The Unload Job window

begin figure description - This figure is described in the surrounding text. - end figure description

In addition to completing the main flow of the Unload Job window, the Generate option also enters the Source Database information in the upper right corner and creates path names for the Discard Records file and the Logfile. The HPL browsing options, describes the rejected records file and the log file.