Reference > Utilities


fileloader utility


Overview

The fileloader utility loads managed files into a WebSphere Commerce database. Once the files are loaded into the database, the scheduled job...

ScheduledContentManagedFileEARUpdate

...copies the files from the database to the WebSphere Commerce EAR file.

The fileloader utility is not provided with WebSphere Commerce Developer.

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

  1. Configure the loading utilities.
  2. Configure tracing and logging for the loading utilities.

Run this utility as the non-root WebSphere Commerce user ID. Do not run this command as root.


Utility command

The fileloader utility has the following file name:


Parameter values

Unless indicated, all of the parameters listed are required.

-dbname

Name of the target database

The Oracle TNS name of the target database.

This is the database name as displayed in the relational database directory (WRKRDBDIRE) .

For DB2 UDB databases, the Type 2 database name is deprecated, where the database names do not contain a prefix.

That is, the DB2 Type 4 JDBC driver is used instead, where the Type 4 database name is prefixed with the database server and port. For example, db_server:db_port/db_name.

See the DB2 Information Center for more information:

-dbuser

Name of the user connecting to the database This is usually the same as the instance user name

-dbpwd

Password for the user connecting to the database

-inputpath

The full path of the file to load or the full path to the directory containing the files to load.

If the input path you specify is a directory, all of the files in the directory will be loaded as managed files.

If the input path you specify is the path to a ZIP file, you should specify the -iszipfile parameter. If you do not specify the -iszipfile parameter, the ZIP file will be treated be treated as a single managed file.

-serverpath

The relative path path on the server where you want the managed files to go when the ScheduledContentManagedFileEARUpdate scheduled job copies the file from the database to the WebSphere Commerce EAR file.

Paths specified by this parameter are relative to the WC_EAR/Stores.war directory.

Important: If you are loading files to use as catalog or marketing attachments, the server path must start with the following path:

storedir/Attachment.

Files outside of the directory are not recognized by the catalog and marketing attachments tools.

For example, if you specify storedir/Attachment/myfiles/loaded_files as the -serverpath, the managed files would be copied to the following directory:

If you are loading a ZIP that contains path information for multiple flies and you set -iszipfile to true, the path information is maintained relative to the path you specify as the -serverpath.

For example, if the ZIP files contains a file called image.gif, the path information stored in the ZIP file for the image is extra_files/special_images, and you specify myfiles/loaded_files as the -serverpath, the full path to image.gif is:

    WC_EAR/Stores.war/ storedir/myfiles/loaded_files/extra_files/special_images/image.gif

-iszipfile

Optional: If the file you loading with the fileloader utility is a ZIP file, set this parameter accordingly.

If you do not specify this parameter, the fileloader utility runs as if -iszipfile is set to false.

This parameter accepts the following values:

true

If you set the iszipfile parameter to true, the fileloader utility will uncompress the ZIP file and load each file in the ZIP file into the database as a separate managed file. The paths of the files in the ZIP file will be maintained.

false

If you set the iszipfile parameter to false, the fileloader utility will treat the ZIP file as a single managed file. The ZIP file will not be uncompressed.

-workspacename

This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server.

Optional: The workspace code which is the system generated identifier for the workspace, not the name assigned to the workspace by the Workspace Manager. Specify this parameter if you want the fileloader utility to load the managed files into a workspace and not the production-ready data.

If you specify the -workspace parameter, specify the following parameters:

-taskgrp

This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server.

The task group code which is the system generated identifier for the task groups, not the name assigned to the task group by the Workspace Manager.

-task

This parameter can only be used when loading files into a workspace on an authoring server. This parameter cannot be used when loading files on a staging server or a production server.

The task code which the system generated identifier for the task, not the name assigned to the task by the Workspace Manager.

If you are using the fileloader utility on an authoring server and you do not specify the workspcname parameter, the managed files are loaded into the production-ready data.

-uploadtimestamp

Optional: This is the date and time at which the managed file has been loaded into the database. The ScheduledContentManagedFileEARUpdate scheduled job uses the managed file time stamp as one of its criteria for copying files from the WebSphere Commerce database to the WebSphere Commerce EAR file.

If you do not specify this parameter, the current time stamp is used.

The format of the time stamp must be:

yyyy. mm. dd_ hh: mm: ss where the variables are:

yyyy

The year for the time stamp as a 4-digit number.

mm

The month for the time stamp as a 2-digit number.

dd

The day of the month for the time stamp as a 2-digit number.

hh

The hour for the time stamp as a 2-digit number. Specify the number according to the 24-hour clock. For example, 11 p.m. would be 23.

mm

The minutes for the time stamp as a 2-digit number in the range 00-59.

ss

The seconds for the time stamp as a 2-digit number in the range 00-59.

-idpoolsize

Optional: This is the number of identifiers to be reserved for the managed files you are loading. For each file you are loading using the fileloader utility, reserve 1 identifier. For example, if you are loading a ZIP file containing 700 managed files, you should set the idpoolsize to 700.

If you do not set this parameter, the number of identifiers is set to 500.

-customizer

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

Specify one of the following customizer values:

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

  • Required: Specify one of the following customizer files:

    FileLoaderISeriesCustomizer

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

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

    WC_INSTALL/properties/FileLoaderISeriesCustomizer.properties

    FileLoaderToolboxCustomizer

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

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

    WC_INSTALL/properties/FileLoaderToolboxCustomizer.properties

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

    ./fileloader.sh -dbname MY.HOSTNAME.COM 
                    -dbuser instance 
                    -dbpwd mypass 
                    -inputpath ./image.gif 
                    -serverpath Stores.war/Attachments 
                    -customizer FileLoaderToolboxCustomizer
    

  • Required: FileLoaderOracleCustomizer

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

    WC_INSTALL/properties/FileLoaderOracleCustomizer.properties


Related concepts

Overview of the mass load utilities
Transforming, loading, and extracting data using the WebSphere Commerce loading utilities
Managed files
Jobs
Scheduler
Workspaces, task groups, and tasks
Author server


Related tasks

Configure the environment variable setting scripts

Changing managed file WebSphere Commerce EAR updater parameters

Related reference

massload utility (Server environment)


+

Search Tips   |   Advanced Search