Output Files

The files produced from a Loader run are titled MCPSQL/LOADER/<mix number>/<report ID>.

The following table identifies the report IDs and the contents of the respective files.

Report ID

Description

REPORT

Summarizes the load run.

  • Identifies the configuration file used and its contents

  • Identifies the data file used

  • Provides a summary of the load outcome

    • Expansion of the configuration file input to show how it was interpreted.

    • The number of records from the data file that were examined, skipped, loaded, excluded, and rejected.

    • The duration of the run.

ERRORS

Lists errors encountered during the execution of the Loader utility. These can include

  • Setup errors in which the load is not processed and can include

    • Problems in the command line arguments.

    • Problems in the configuration.

    • Problems connecting to the database.

  • Load errors

    Input records that could not be loaded including the record content and the error condition are reported.

Note: An errors file is created even if there are no errors. In this case, the file indicates that no errors occurred.

REJECTS

Lists any input records that contained errors when an attempt was made to load them.

This file is not created if there were no rejected input rows.

EXCLUDES

Lists any input records that were excluded from the load by virtue of an OMIT condition.

Sample MCPSQL Loader Utility Scenario

The following scenario provides an example to illustrate some of the above configuration file and data file specifications.

As noted earlier, the table that is to be loaded must already be defined as part of the database schema. For this scenario, assume that the table is described as shown by the following DDL.

create table product
     (id            numeric(8) not null,
      name          varchar(255) not null,
      description   varchar(4000),
      msrp          numeric(8,2),
      endOfLifeYear numeric(4),
      primary key (id)
     )

Configuration File Named LOADER/CONFIG/MYTABLE

[LOADER]
RESOURCE=ORDERSDB
TABLE=PRODUCT
SKIP=2
RECORD=CONTINUED
CONTINUATION=\
FORMAT=DELIMITED
DELIMITER=|
NUMFIELDS=5
MAXERRORS=10
NULLONBLANK=description
ZEROONBLANK=MSRP, ENDOFYEARLIFEYEAR

Data File Named MYTABLE/DATA

Product table extract
Date extracted: October 18, 2012
139824| Declaration of Independence| When in the Course of \
Human events, it becomes necessary for one people to dissolve \
the political bands which have connected them with another, \
and to assume among the powers of the earth, the separate and \
equal station to which the Laws of Nature and of Nature's God \
entitle them, a decent respect to the opinions of mankind \
requires that they should declare the causes which impel them \
to the separation.|39.95|0
127439| Patrick Henry Speech||19A95|2011
852371| Gettysburg Address|Four score and seven years ago \
our fathers brought forth on this continent, a new nation, \
conceived in Liberty, and dedicated to the proposition that \
all men are created equal.| 39.35|0

MCPSQL Loader Command

E *SYSTEM/MCPSQL/LOADER ("LOADER/CONFIG/MYTABLE,
 MYTABLE/DATA ON MYPACK")

The Result

In the preceding sample data file, there are a total of five logical records. Each record begins with bold text for ease of identification.

  • The first two records are skipped as a result of the SKIP declaration in the configuration file.

  • The third and fifth records are loaded into the database.

  • The fourth record is rejected since the fourth field maps onto the msrp column and the numeric field contains an alpha character.

The Output Files

The Report file from this scenario would be

INPUT:
   Config file name............. LOADER/CONFIG/MYTABLE.
   Data file name............... (RNEU)MYTABLE/DATA ON MYPACK.
CONFIGURATION INPUT:
   Resource name................ ORDERSDB
   Schema name..................
   Table name................... PRODUCT
   Fields.......................
   Record Format................ CONTINUED
   Continuation String.......... \
   Source Format................ DELIMITED
   Delimiter.................... |
   Null String.................. <NULL>
   LOB is File String........... <FILE>
   Records to skip.............. 2
   Records to process........... 0
   Max errors................... 10
   Action if errors exceeded.... DISCARD
   Null on blank................ DESCRIPTION
   Zero on blank................ MSRP, ENDOFLIFEYEAR
   Mappings.....................
   Filter Library..............
   Filter Function.............
   Filter Initilize Function...
   Include Rule................
   Exclude Rule................
   Omit String..................
   Keep String..................
CONFIGURATION EXPANSION:
   Field List................... ID
                                 NAME
                                 DESCRIPTION
                                 MSRP 
                                 ENDOFLIFEYEAR
   Null on Blank List........... DESCRIPTION
   Zero on Blank List........... MSRP
                                 ENDOFLIFEYEAR
PROCESSING SUMMARY:
   Records skipped.............. 2
   Records examined............. 3
   Records loaded............... 2
   Records rejected............. 1
   Records excluded............. 0
   Start Time................... 2012/12/11 11:36:50
   End Time..................... 2012/12/11 11:36:52

The Errors file from this scenario would be

Invalid data value 19A95 for MSRP
127439| Patrick Henry Speech||19A95|2011
------------------------------------------------------------

The Rejects file from this scenario would be

127439| Patrick Henry Speech||19A95|2011

There would not be an Excludes file generated from this scenario.