

    TXWIZARD - SAMPLE WIZARD FOR INDEXING AND SEARCH (WINDOWS AND AIX ONLY)
    -----------------------------------------------------------------------


    NOTE: This information, the Sample Wizard for Indexing and Search,
          and the supplied source code is provided "as is" without
          warranty of any kind, either expressed or implied.


    TXWIZARD is a graphical tool for indexing and search which allows you
    to create a search query step by step. The complete query is displayed
    as a tree diagram. Once a query has been completed it can be modified either
    by selecting parts of the tree using the mouse and clicking on one of the
    tree icons, or by modifying the generated SQL query. By selecting the
    "Administration" button in step 3 of the query wizard, an administration
    dialog is started which lets you create or delete indexes on the local DB2
    Text Extender server, and get the index status and index settings of an
    index.

    PREREQUISITES

    AIX:     Java Development Kit (JDK) version 1.1.7 or higher
    WINDOWS: Because there is a Java Runtime Environment (JRE) included in the
             installation, there are no prerequisites for Windows

    RUNNING TXWIZARD

    AIX:     Logon with a DB2 instance owner ID and enter 'txwizard' on
             the command line.
    WINDOWS: Select TXWIZARD in the 'Start -> Programs -> DB2 Extenders -> Text Extender'
             folder, or type 'txwizard' on the command line.

    NOTES

    - TXWIZARD will not run properly if multiple instances of
      txwizard are running at same time.

    POSSIBLE PROBLEMS

    - Java doesn't find the com.ibm.db2.* classes:
      Windows:
      Correct the setting of the CLASSPATH variable inside the startup batch file
      %DMBMMPATH%\samples\wizard\deswiz.bat in the current installation directory
      of the DB2 Extenders. You will find information about the required classes in this file.
      AIX:
      Ensure that the CLASSPATH variable points to the files db2java.zip and
      runtime.zip in the local DB2 installation. To include the DB2 Java classes
      in the CLASSPATH you can use the following command; the exact path
      depends on the installation path of DB2:
       export CLASSPATH=$HOME/sqllib/java/sqlj.zip:$HOME/sqllib/java/runtime.zip:$HOME/sqllib/java/db2java.zip:$CLASSPATH
    - It's not possible to create a new index because the "Create index" button
      in the Administration dialog is not enabled:
      To enable the button, confirm the name of the index by pressing the Enter key.
      It's important to select the index type before chosing the name of a new index
    - You tried to create an index of type DUAL: The index type DUAL is no longer supported

    STRUCTURE OF THE SOURCE CODE

    The Java source code of TXWIZARD is provided in the file
    source.zip. The location of this file is
    WINDOWS:  %DMBMMPATH%\samples\wizard\source.zip
    AIX:      /usr/lpp/db2tx_07_01/samples/wizard/source.zip
    The source code consists of 29 Java files which are compressed in
    source.zip. TXWIZARD was created using IBM VisualAge for Java version 2.0.
    Do not use the Visual Composition Editor to modify TXWIZARD because this
    would destroy parts of the code. Because there is some documentation
    provided inside the Java files, the following text only gives an overview of
    the functions of the most important classes.

    Class             Function
    ----------------------------------------------------------------------------
    TED               The main class of TXWIZARD which holds most of the
                      information that is needed throughout the program
                      execution. Only one instance of TED is created.
                      The method run_query runs the SQL query built by class
                      TSQL_Query and then reads out the results.
    TMain             The class implements the main window of the application.
    TSearchWizard     Windows of the query wizard (steps 1 - 5).
    New_Admin         The administration dialog to be started using the
                      "Administration" button in step 3 of the query wizard.
    TAdmin            This class implements the interface to the DB2 Text
                      Extender administration functions.
                      Because there is no DB2 Text Extender administration API,
                      the administration commands are sent to the DB2 Text
                      Extender by a system call to the db2tx command line
                      processor. See methods execute_db2tx and index_status.
                      The Text Extender commands to be executed are written into
                      the temporary files deswizcd.tmp and deswizld.tmp. The
                      screen output of the "enable text column" and the
                      "disable text column" command is redirected to the files
                      deswizcl.tmp. The screen output of the "get index status"
                      command is redirected to the file "deswizsl.tmp" which is
                      then analysed by the method index_status. All temporary
                      files are written to the following directory:
                      WINDOWS:  %DMBMMPATH%\samples\wizard
                      AIX:      $HOME/db2tx
                      The target directory can be set by the -DlogDir option
                      when starting the Java interpreter. See start-up script
                      %DMBMMPATH%\bin\txwizard.bat for Windows and
                      /usr/lpp/db2tx_07_01/bin for AIX.
    TSQL_Query        This class implements a complete SQL query.
    ErrorHandling     This class handles various types of error-messages by
                      putting them into a message box and displaying the box on
                      the screen.
    Language          This class provides external language file support.
                      The method Language reads the language file "messages.en"
                      and puts all texts and messages into a string array.
                      The method get_word returns a string at the specified
                      index.
                      Changes to messages can be implemented in the text
                      file "lang_eng.dat" which can then be converted to the
                      unicode file "messages.en" using class Text2Unicode.
    TShowDoc          This class implements a simple document viewer.

