Loading the attribute dictionary

To use any attribute dictionary data you have created, first load the data into WebSphere Commerce.

Before you beginBefore you begin, ensure that Feature Pack 4 is successfully enabled.

About this taskTo load the attribute dictionary:

  1. Make a backup copy of the existing wcs.dtd file under the following directory:

  2. Open the wcs.dtd in a text editor.

  3. Locate component-services.dtd under the following directory; then open it in a text editor:

  4. Copy the following content (in bold) from component-services.xml:
    <!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 wcs.dtd:

    You must add the “|” .

    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)*)>
    

  5. Copy all the element definitions of the new tables from component-services.xml and paste the element definitions at the end of wcs.dtd:
    <!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"
    >
    

  6. Prepare the massload data in an XML file; then place the file in the following directory:

    If you place this file in different directory, you need to modify the relative path to the wcs.dtd file.

  7. If using a Cloudscape database, make sure sever is not running.

  8. Open a command window, navigate to the directory where you put the mass load XML file and run the following command:
    WCDE_installdir or WC_installdir\bin\idresgen.bat CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemaname
    

    Cloudscape does not need the dbname, user, password and schemaname.

  9. Run massload using the outputxml from the previous step as input:
    WCDE_installdir or WC_installdir\bin\massload.bat outputxml dbname user password schemaname
    

  10. Check the database to make sure the data is loaded.