Converting data server files

If you need to edit data server files, you can convert the binary data to text, and then convert the changed text back into binary format when you return the files to the data server.

About this task

You might want to convert binary data to text because you need to troubleshoot a problem and you want to see or modify specific values in the data server. For another example, you might want to convert the data because you need to set an advanced configuration option that is not exposed through the user interface.

To view or make changes to data server files, use the bnsDServerConverter88.exe command on Windows, or the bnsRun convert command on AIX®, Linux, or Solaris, to convert the binary content to text. After you make your changes, you can run the command again to convert the file back to binary format.

Restrictions:
  • Use these procedures only if you are working with an IBM Software Support representative who instructs you to convert data server files to text for troubleshooting purposes.
  • When you convert binary data to text, the utility creates a file in ASCII format with the extension .txt. When you run the utility, you specify where the file is to be created. Be sure to specify a path that is not in the data server directory, Classification_Home/dserverdir. If text files are in the data server directory, errors are returned.
  • You must use a plain text editor to edit the text files. Do not use a program like Microsoft Excel to edit the text files because such programs can reformat data incorrectly. For example, the Excel program might remove surrounding quotes from fields.
  • When the data server is running, the utility issues a request to the server, which means that you must identify the file that you want to convert by file name. When the data server is not running, the utility directly accesses the file that you want to convert, which means you must specify the full path for the location of the binary data server file.
  • Start of change You can convert an individual binary file or all files in the data server directory. But you must use the same method for converting the binary data to text and then converting the text back to binary format. For example, if you convert an individual binary file, you must convert the individual text file back to binary format. You cannot convert an individual binary file to text format and then try to convert the directory in which the text file is located back to binary format. End of change

Converting files on Windows

About this task

The commands that you use to convert files depend on whether the data server is running and whether you want to convert individual files or all files in the data server directory.

Procedure

  1. If the data server is running, enter the following commands to convert individual data server files.
    1. Convert a binary data server file to text:

      bnsDServerConverter88.exe pull binary_file_name ascii_file_path

      Where:
      binary_file_name
      Specifies the name of the data server file that you want to convert.
      ascii_file_path
      Specifies the fully qualified path for where the text file is to be created.
      For example: bnsDServerConverter88.exe pull MachineAdmin C:\asciiOutput\machineAdmin.txt
    2. After you edit the text file, enter the following command to convert the file back to binary format and store the file on the data server. Ensure that you specify the fully qualified path for the text file and the name of the binary data server file correctly.

      bnsDServerConverter88.exe push ascii_file_path binary_file_name

  2. If the data server is not running, change to the Classification_Home\Bin directory and enter the following commands to convert individual data server files.
    1. Convert a binary data server file to text:

      bnsDServerConverter88.exe b2a binary_file_path ascii_file_path

      Where:
      binary_file_path
      Specifies the fully qualified path for the data server file that you want to convert.
      ascii_file_path
      Specifies the fully qualified path for where the text file is to be created.
      For example: bnsDServerConverter88.exe b2a C:\IBM\ContentClassification\dserverdir\Languages C:\asciiOutput\Languages.txt
    2. After you edit the text file, enter the following command to convert the file back to binary format and store the file on the data server. Ensure that you specify fully qualified paths for the directories.

      bnsDServerConverter88.exe a2b ascii_file_path binary_file_path

  3. If the data server is not running, change to the Classification_Home\Bin directory and enter the following commands to convert all data server files.
    1. Convert all binary data server files to text:

      bnsDServerConverter88.exe b2a dataserver_directory_path text_directory_path

      Where:
      dataserver_directory_path
      Specifies the fully qualified path for the data server directory.
      text_directory_path
      Specifies the fully qualified path for a directory where the text files are to be created.
      For example: bnsDServerConverter88.exe b2a C:\IBM\ContentClassification\dserverdir C:\asciiOutput
    2. Enter the following command to convert all text files in an output directory back to binary format and store the files in the data server directory: Be sure to specify fully qualified paths for the directories.

      bnsDServerConverter88.exe a2b text_directory_path dataserver_directory_path

Converting files on AIX, Linux, and Solaris

About this task

The commands that you use to convert files depend on whether the data server is running and whether you want to convert individual files or all files in the data server directory.

Procedure

  1. Log in as a Content Classification user.
  2. Change to the Classification_Home/Bin directory.
  3. If the data server is running, enter the following commands to convert individual data server files.
    1. Convert a binary data server file to text:

      ./bnsRun convert pull binary_file_name ascii_file_path

      Where:
      binary_file_name
      Specifies the name of the data server file that you want to convert.
      ascii_file_path
      Specifies the fully qualified path for where the text file is to be created.
      For example: ./bnsRun convert pull MachineAdmin /user_home/asciiOutput/machineAdmin.txt
    2. After you edit the text file, enter the following command to convert the file back to binary format and store the file on the data server. Ensure that you specify the fully qualified path for the text file and the name of the binary data server file correctly.

      ./bnsRun convert push ascii_file_path binary_file_name

  4. If the data server is not running, enter the following commands to convert individual data server files.
    1. Convert a binary data server file to text:

      ./bnsRun convert b2a binary_file_path ascii_file_path

      Where:
      binary_file_path
      Specifies the fully qualified path for the data server file that you want to convert.
      ascii_file_path
      Specifies the fully qualified path for where the text file is to be created.
      For example: ./bnsRun convert b2a /user_home/IBM/ContentClassification/dserverdir/MachineAdmin /user_home/asciiOutput/machineAdmin.txt
    2. After you edit the text file, enter the following command to convert the file back to binary format and store the file on the data server. Ensure that you specify fully qualified paths for the directories.

      ./bnsRun convert a2b ascii_file_path binary_file_path

  5. If the data server is not running, enter the following commands to convert all data server files.
    1. Convert all binary data server files to text:

      ./bnsRun convert b2a dataserver_directory_path text_directory_path

      Where:
      dataserver_directory_path
      Specifies the fully qualified path for the data server directory.
      text_directory_path
      Specifies the fully qualified path for the directory where the text files are to be created.
      For example: ./bnsRun convert b2a /user_home/IBM/ContentClassification/dserverdir /user_home/asciiOutput
    2. Enter the following command to convert all text files in an output directory back to binary format and store the files in the data server directory: Be sure to specify fully qualified paths for the directories.

      ./bnsRun convert a2b text_directory_path dataserver_directory_path