massextract utility

The massextract utility uses a query against a database to extract selected subsets of data from the database into an XML document. The data to be extracted from the database is specified using an extraction-filter XML document.

The function of the massextract utility is opposite that of the massload utility. Use the massextract utility to extract selective subsets of data from the WebSphere Commerce database in the form of XML files. You can extract data on products related to an upcoming holiday, for example, or you can extract information from a consolidated database for use with other systems.

Before running this utility, ensure that you have complete the required configuration tasks:

  1. Configure the environment variable setting scripts.

  2. Configure the massextract utility.

  3. Configure tracing and logging for the loading utilities.

  4. Create an extraction filter.

Filenames specified as parameters for this utility can be preceded by relative or absolute paths. Relative paths must be relative to the directory from which you run the massextract utility.

In addition to the the trace log and message log for the loading utilities, this utility produces the following log file:

(AIX)(Linux)(Solaris) Run this utility as the non-root WebSphere Commerce user ID. Do not run this command as root.

 

Utility command

The massextract utility has the following file name:

 

 

Parameter values

-filter

Name of the extraction-filter file

-outfile

Name for the output XML file where the extracted data will be stored

-dbname

  • Do not specify this parameter when using Cloudscape as the development database.

  • (AIX)(Linux)(Solaris)(Windows) Name of the database from which data is being extracted.

  • (i5/OS) This is the database name as displayed in the relational database directory (WRKRDBDIRE).

  • The TNS name of the database from which you are extracting data.

-dbuser

-dbpwd

  • Do not specify this parameter when using Cloudscape as the development database.

  • Password associated with the user name for the database from which data is being extracted

-customizer

Name of the customizer property file to be used for your WebSphere Commerce database. When specifying the customizer property file with this parameter, omit the ".properties" file extension.

Specify one of the following customizer values:

  • Do not specify this parameter when extracting data from the development database.

  • (AIX)(Linux)(Solaris)(Windows) (Not required) Do not specify this parameter if you are using DB2 Universal Database on AIX, Linux, Solaris, or Windows operating systems.

  • (i5/OS) (Required) Specify one of the following customizer files:

    ISeries_EXTWCSDTA_Customizer

    Specify this customizer value if you are using the native i5/OS JDBC driver.

    When you specify this value, the massextract utility uses the values specified in the following file:

    WC_installdir/properties/ISeries_EXTWCSDTA_Customizer.properties

    Toolbox_EXTWCSDTA_Customizer

    Specify this customizer value if you are using the IBM Toolbox for Java JDBC driver.

    When you specify this value, the massextract utility uses the values specified in the following file:

    WC_installdir/properties/Toolbox_EXTWCSDTA_Customizer.properties

    If you specify this customizer value, specify the hostname as the -dbname parameter. The following is an example of invoking the massextract utility:

    ./massextract.sh -dbname MY.HOSTNAME.COM -dbuser instance -dbpwd mypass -filter
    /path/filter.xml -outfile /path/file.xml -customizer Toolbox_EXTWCSDTA_Customizer
    

    This customizer properties file is located in the WC_installdir/properties directory.

  • (Required) DB2390ConnectionCustomizer

    When you specify this value, the massextract utility uses the values specified in the following file:

    WC_installdir/properties/DB2390ConnectionCustomizer.properties

  • (Required) OracleConnectionCustomizer

    When you specify this value, the massextract utility uses the values specified in the following file:

    WC_installdir/properties/OracleConnectionCustomizer.properties.

-schemaname

Name of the database schema from which data is being extracted. This parameter is optional. If this parameter is not specified when running the utility, the utility looks for a name=value pair in the customizer property file that specifies the value of SchemaName. If this pair is present in the property file, the utility uses the value specified. If neither a command-line nor a property-file specification for this parameter exists, the utility defaults to the schema name of the table in the database.

 

Example

The following example extracts Member subsystem data from a database using MemberSubsystemFilter.xml as an extraction filter.

(AIX)(Linux)(i5/OS)(Solaris)

./massextract.sh -filter MemberSubsystemFilter.xml -outfile MemberSubsystemExtracted.xml -dbname mall -dbuser myname -dbpwd mypassword -customizer MemberSubsystemCustomizer

(Windows)

massextract.cmd -filter MemberSubsystemFilter.xml -outfile MemberSubsystemExtracted.xml -dbname mall -dbuser myname -dbpwd mypassword -customizer MemberSubsystemCustomizer

Related concepts

Related tasks

Related reference