For IBM i OS operating systemSolarisLinuxAIXWindows

fileloader utility

The fileloader utility loads managed files into a WebSphere Commerce database. Once the files are loaded into the database, the ScheduledContentManagedFileEARUpdate scheduled job copies the files from the database to the WebSphere Commerce EAR file.

WebSphere Commerce Developer The fileloader utility is not provided with WebSphere Commerce Developer.

WebSphere Commerce Version 7.0.0.1The fileloader utility does not work on Oracle RAC database.

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

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

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

fileloader utility syntax diagram. See the list that is called Parameter values for the applicable parameters.

Utility command

The fileloader utility has the following file name:

  • For IBM i OS operating systemSolarisLinuxAIXfileloader.sh fileloader.cmd

Parameter values

Unless indicated, all of the parameters that are listed are required.

-dbname
SolarisDB2LinuxAIXWindowsName of the target database
DB2Note: For DB2 UDB databases, the DB2 Type 4 JDBC driver is used, where the Type 4 database name is prefixed with the database server and port. For example, db_server:db_port/db_name.

OracleThe Oracle TNS name of the target database.

For IBM i OS operating systemThe value for this parameter is the database name as displayed in the relational database directory (WRKRDBDIRE).

-dbuser
Name of the user that is connecting to the database.

For IBM i OS operating systemThis name is usually the same as the instance user name

-dbpwd
Password for the user that is connecting to the database
-inputpath
The full path of the file you want to load or the full path to the directory that contains the files you want to load.

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

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

-serverpath
The relative 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 that are specified by this parameter are relative to the WC_eardir/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 storedir/Attachment directory are not recognized by the catalog and marketing attachments tools.

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

  • WC_eardir/Stores.war/ storedir/Attachment/myfiles/loaded_files

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

For example, if your compressed files contain a file that is called image.gif, the path information that is stored in the compressed 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_eardir/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 compressed 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 decompresses the compressed file and load each file in the compressed file into the database as a separate managed file. The paths of the files in the compressed file are maintained.
false
If you set the iszipfile parameter to false, the fileloader utility treats the compressed file as a single managed file. The compressed file is not decompresses.
WebSphere Commerce EnterpriseWebSphere Commerce Professional-workspacename
WebSphere Commerce EnterpriseWebSphere Commerce Professional
Important: This parameter can be used only when you are oading 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 that is the system generated identifier for the workspace, not the name that is 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.
WebSphere Commerce EnterpriseWebSphere Commerce Professional If you specify the -workspace parameter, you must specify the following parameters:
-taskgrp
Important: This parameter can be used only when you are 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 that is the system generated identifier for the task groups, not the name that is assigned to the task group by the Workspace Manager.
-task
Important: This parameter can be used only when you are 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 that the system generated identifier for the task, not the name that is 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: The value for this parameter is the date and time at which the managed file is 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 is:

yyyy. mm. dd_ hh: mm: ss

Where:
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: The value of this parameter is the number of identifiers to be reserved for the managed files that you are loading. For each file you are loading with the fileloader utility, reserve 1 identifier. For example, if you are loading a compressed file that contains 700 managed files, 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 your WebSphere Commerce database. When you are specifying the customizer property file with this parameter, omit the ".properties" file extension.

Specify one of the following customizer values:

  • SolarisLinuxAIXWindows (Not required) Do not specify this parameter if you are using DB2 Universal Database on AIX, Linux, Solaris, or Windows operating systems.
  • For IBM i OS operating system Required: Specify one of the following customizer files:
    FileLoaderISeriesCustomizer
    Specify this customizer value if you are using the native JDBC driver.

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

    WC_installdir/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 that are specified in the following file:

    WC_installdir/properties/FileLoaderToolboxCustomizer.properties

    If you specify this customizer value, you must 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
    
  • OracleRequired: FileLoaderOracleCustomizer

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

    WC_installdir/properties/FileLoaderOracleCustomizer.properties
    Note: By default, the FileLoaderOracleCustomizer.properties file includes the following setting:
    ConnectStringID = jdbc:oracle:thin:@localhost
    This setting might not work for all database connections, for instance, when the database is remote. Ensure that you update the localhost value for this setting to match your database hostname or IP address.