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.
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 IBM®
Informix® DB-Access User's Guide.
To generate the unload job:
- Choose from the HPL window.
The
Unload
Job Select window appears, as the following figure shows.
Figure 1. The Unload Job Select
window
- Click Create in the Selection
Type group.
- Choose a name for the unload job and type it in the Job
Name text box. This example uses the name unld.
- 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
- Click the Generate button.
The Autogenerate
Unload Components window appears. Figure 3 shows the completed
window.
- 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.
- 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. Figure 2 shows
an example of a selection list.
- Type items in the Table text
box.
Figure 3. The
Autogenerate Unload Components window
- 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.
- 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.
- Click OK.
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 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
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.