Running string concatenation

The string concatenation utility runs an SQL file that you edit to provide input and output parameters.

Important:
  • The string concatenation utility puts the system into System Administration Mode (SAM) prior to concatenating any fields. No other activity can happen while the script is running.
  • You can concatenate into an existing long text field, but only if that field has not been used in any way. Attempting to concatenate into a long text field that has been used causes the utility to fail.
  • When you concatenate multiple strings, if field level security is applied to any of the strings, then after concatenation into a single, large long text field, some hidden values can be visible. To prevent unauthorized users from viewing the values for a concatenated string, apply the same field level security rule to the large long text field.
Tip: Run the script in preview mode (a setting in the field_concat_template.sql file) to check the results before doing the concatenation.

Procedure

  1. Log on to a system as a user with Administrator privileges. You can use any system with access to SQL*Plus that can connect to the IBM OpenPages® with Watson™ database server.
  2. Stop all services (see Starting and stopping servers).
  3. Navigate to the field-concat-utility folder located in the bin directory:
    Table 1. Installation locations
    Operating system Installation location
    Windows <OP_HOME>\aurora\bin
    Linux® <OP_HOME>/aurora/bin
  4. Copy the contents of the SQL template field_concat_template.sql into a new file.

  5. Edit the new SQL file to provide the values necessary. Edit only the values in the declaration section of the SQL file. For details, see The string concatenation SQL file.
    Important: Many of the parameters specified in the SQL file have requirements, restrictions, and cautions noted. These are important for a successful concatenation.
    Tip: When editing your copy of the field_concat_template.sql file with multi-byte characters, and saving the file in Unicode, your editor may insert a Byte Order Mark (BOM) into the file. Some applications (such as a text editor or a browser) display the BOM as an extra line in the file, while others display unexpected characters, such as . If you save the file in UTF-8 encoding (leaving the BOM in the file) and run the string concatenation script, you get an error message (SP2-0734: unknown command beginning "---------..."), but the script continues to run without a problem. This error has no effect on the script running, but if you prefer not to see the error, save the file without a Byte Order Mark.
  6. Run the following command:
    Windows
    field_concat <SID> <op_db_user> "<op_db_password>"
      <field_concat_template_file>
    Linux
    field_concat.sh <SID> <op_db_user> '<op_db_password>'
      <field_concat_template_file>
    Table 2. Parameters
    Parameter name Description
    <SID> The system ID or TNS alias for the OpenPages database instance.
    <username> The OpenPages database schema user name.
    <password> The OpenPages database schema owner password.
    If the password contains special characters, surround the password in quotation marks:
    • Windows: "password"
    • Linux: 'password'
    <field_concat_template_file> The name of the SQL file created in step 3.
    Tip: To see details on database operation messages, run the following SQL statement:
    select exception_text from error_messages where
     ERROR_MESSAGE_ID = &ERROR_MESSAGE_ID;
  7. Start all services (see Starting and stopping servers).
  8. Optional: Apply a field level security rule to the large long text field. For more information, see Field level security.

Results

If the destination long text field does not exist, it is created and populated with values according to the values specified in the SQL file.

If the destination long text field exists, but is not used in any way, it is populated with values according to the values specified in the SQL file.

For details on the SQL file, see The string concatenation SQL file.