To use any attribute dictionary data you create,
you must first load the data into WebSphere Commerce. This topic uses
the mass load utility to load data into your database.
The massload utility
is deprecated for WebSphere Commerce Version 7 Feature Pack 6. The
Data Load utility is the recommended command-line loading utility.
If you are currently using the mass load utility, you are recommended
to switch to the Data Load utility to load your CSV and XML input
files into your target database. If your system contains scheduled
and automated processes that use massload, it is recommended that
you update these processes to use the Data Load utility. Other WebSphere
Commerce utilities that use the massload utility, such as the acpload
utility, continue to use the massload utility in WebSphere Commerce
Version 7 Feature Pack 6. If you have business reasons to continue
using the massload utility, you can continue to use this utility.
For more information about the Data Load utility, see Overview of the Data Load utility.
You can switch to the Data Load utility by using the TableObjectMediator
to
load your data when no business object mediator exists for the data
that you are loading. For more about the TableObjectMediator
formation,
see Data Load utility table-based mediator and builder.
Procedure
- Make a backup copy of the existing wcs.dtd file
under the following directory:
- workspace_dir\wc\xml\schema\dtd
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\dtd
- Open the wcs.dtd in a text editor.
- Locate component-services.dtd under
the following directory; then open it in a text editor:
- WCDE_installdir\components\component-services\xml
- WC_installdir\components\component-services\xml
- Copy the following content (in bold)
from the component-services.xml file:
<!ELEMENT import (( attrtype | attr | attrdesc | attrval | attrvaldesc |
catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel |
dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn |
dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef |
dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element |
px_elementnvp)*)>
and merge it with the import element in the
wcs.dtd file:
Note: You
must add the |
character.
tfalgtypds | tfalregdsc | tfdomain | tfdomdsc | tfexteng |
tfsbdomain | tfsbdomdsc | tftradeng | tftrengdsc | tickler |
tklacthist | tklractdsc | tklraction | tklrreason | tklrrsndsc |
tmpbolist | tmpcmplist | tmpffclist | tmpprocid | tmpradtl |
tmprctlist | torcpmap | tradeposcn | trading | transport |
trdattach | trddepamt | trddesc | trdpscnxml | trdpuramt |
trdrefamt | trdtype | trdtypedsc | txcdclass | txcdscheme |
userdemo | userprof | userpvcdev | userpwdhst | userreg | users |
usrtraffic | utmerinfo | utregip | vendor | vendordesc |
versionspc | wcsdictnry | wcsdtnryds | wcsgbldata | wmmmap |
wsalesvw | wtaxinfo | wusrtrvw | attrtype | attr | attrdesc | attrval | attrvaldesc |
catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel |
dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn |
dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef |
dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element |
px_elementnv)*)>
- Copy all the element definitions of the new tables from
the component-services.xml file and paste the
element definitions at the end of the wcs.dtd file:
<!ELEMENT attr EMPTY>
<!ATTLIST attr
attr_id CDATA #REQUIRED
identifier CDATA #REQUIRED
attrtype_id CDATA #REQUIRED
attrdict_id CDATA #IMPLIED
storeent_id CDATA #REQUIRED
optcounter CDATA "0"
>
…
<!ELEMENT px_elementnvp EMPTY>
<!ATTLIST px_elementnvp
px_elementnvp_id CDATA #REQUIRED
px_element_id CDATA #REQUIRED
name CDATA #REQUIRED
value CDATA #REQUIRED
optcounter CDATA "0"
>
- Prepare the massload data
in an XML file; then place the file in the following directory:
- \xml\schema\
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\
Note: If you place this file in different directory, you must
modify the relative path to the wcs.dtd file.
- Ensure that the server
is not running.
- Open a command window, navigate to the directory where
you put the mass load XML file and run the following command:
- WCDE_installdir\bin\idresgen.bat
CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemaname
- WC_installdir\bin\idresgen.bat
CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemaname
Note: A database
does not need the
dbname, user, password and
schemaname.
- Run massload with the outputxml from
the previous step as input:
- WCDE_installdir\bin\massload.bat outputxml dbname user password schemaname
- WC_installdir\bin\massload.bat outputxml dbname user password schemaname
- Check the database to make sure that the data is loaded.
What to do next
Now, you can enable the attribute
dictionary for your site.