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
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
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
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.
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.
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
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.