Home | Previous Page | Next Page   Getting Started > Generate Options >

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 (Figure 9) 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
  1. Choose Jobs > Unload from the HPL window.

    The Unload Job Select window appears, as Figure 24 shows.

  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.

    Figure 24. The Unload Job Select Window
    begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - end figure description
  4. Click OK.

    The Unload Job window appears, as Figure 25 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 25. The Unload Job Window
    begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - end figure description
  5. Click the Generate button.

    The Autogenerate Unload Components window appears. Figure 26 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. Figure 17 shows an example of a selection list.

  8. Type items in the Table text box.
    Figure 26. The Autogenerate Unload Components Window
    begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - 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 already existing device array.

  10. Type the full pathname 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.

The Generate option creates the Query, Format, and Map components for the unload job and fills in 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.

Figure 27 shows the Unload Job window as completed by the Generate option.

Figure 27. The Unload Job Window
begin figure description - This graphic depicts the ipload graphical user interface. The onpladm command line utility provides the same functionality. - end figure description

In addition to completing the main flow of the Unload Job window, the Generate option also fills in the Source Database information in the upper right-hand corner and creates pathnames for the Discard Records file and the Logfile. Browsing, describes the rejected records file and the log file.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]