Beginning in Spectrum 9.3 you must specify the Character set encoding you will use for your Spectrum installation. Therefore, during a Spectrum 9.3 upgrade or migration, the installation process must convert all existing $SPECROOT/custom/Event files to the specified character encoding. At this point of the installation Spectrum renames the custom CsEvFormat (Event Format) files, Event Table files, and CsPCause (Probable Cause) files, and uses the native2ascii converter to convert the files to the proper character set for your installation.
Problem: This conversion process approximately takes 3 seconds per file. However time could vary depending on your system. If you have 3,000 CsEvFormat files, 100 Event Tables, and 3,000 CsPCause Files, the conversion process could take up to 5 hours to complete. Customers with a large number of custom event files may want to use the following work around to help speed up their Spectrum 9.3 installations. For new installations of Spectrum, which do not involve custom event files, there is no need to perform this pre-installation procedure.
In order to help speed up the Spectrum installation, CA has provided a PERL script that allows you to move off the $SPECROOT/custom/Event files and run the conversion of these files apart from the Spectrum installation. Therefore this solution should be considered a pre-installation procedure to prepare your Spectrum environment for a Spectrum 9.3 upgrade or migration before the actual installation begins. The procedure can be run at any time you wish, according to the upgrade/migration plans you have deemed necessary for your environment. If you choose to perform this procedure a day or two before the upgrade, be sure there are no changes made to any of the custom events between the time you have converted the files and begin the Spectrum 9.3 installation.
- Use the attached file or create a file structure where you want to run the PERL script from. For example: C:\Custom-File-Conversion\custom
- Place a copy of the attached PERL script in the file structure you just created.
- Edit the first line of the script so that it contains the path to PERL. For example, using the Spectrum default installation paths:
- For Windows the line would look like (must start with #!): #! /C/win32app/Spectrum/bin/perl
- For UNIX/LINUX the line would look like (must start with #!): #! /usr/Spectrum/bin/perl
- Edit line 6 of the script to point to the file structure you created earlier in step 1. Note: Only provide the main directory of the file structure. Do not include the "custom" subdirectory. For Example: $installDirectory = "C:\\Custom-File-Conversion";
- Save the file as CustomFileUnicodeConversion.pl in the file structure you created in step 1.
For Example: C:\Custom-File-Conversion\custom\CustomFileUnicodeConverstion.pl
- Move a copy of the $SPECROOT\custom\Events directory to the file structure created in step 1.
- CsEvFormat files are copied to C:\Custom-File-Conversion\custom\Events\CsEvFormat
- EventTable files are copied to C:\Custom-File-Conversion\custom\Events\CsEvFormat\EventTables
- CsPCause files are copied to C:\Custom-File-Conversion\custom\Events\CsPCause
- Open a command line window. For Windows open a 'bash -login' shell.
- 8. Change directories to the file structure you created in step 1. For example: cd C:/Custom-File-Conversion/custom
- 9. Execute the script by entering the following command:
- The script will rename the files that need to be converted. Once it is ready to begin the conversion process, you will be asked to enter the ISO code you wish to use for conversion (see figure 1 below).
- Enter ISO-8859-1 for English.
Your options are:
- ISO-8859-1: Latin alphabet part 1 - supports North America, Western Europe, Latin America, the Caribbean, Africa
- ISO-8859-2: Latin alphabet part 1 - supports Eastern Europe
- ISO-8859-7: Latin/Greek part 7 - supports the modern Greek language as well as mathematical symbols derived from Greek
- ISO-8859-8: Latin/Hebrew part 8 - supports languages that use the Hebrew alphabet
- ISO-8859-9: Latin 5 part 9 - supports Turkish language
When complete you should see the following output below (see figure 2):
- Go back and look in your c:\Custom-File-Conversion\custom\Events directory and verify the file names are correct. For example, if you chose ISO-8859-1 the file names should now end with "_en_US", if they end in anything different, such as "_en_US_en_US", they will need to be corrected. Otherwise, the file format will not be recognized by Spectrum. This problem can happen if you run the conversion against files whose name has already been changed. If you already started the Spectrum install, and need to correct the filenames, please see the "To Correct Filenames" section below.
Running the Spectrum Installation:
- When you are ready to run the Spectrum 9.3 installation, be sure to delete, or off load the $SPECROOT\custom\Events\CsEvFormat and CsPCause files. Otherwise the installation will find the original files and try to convert them.
- Run the Spectrum 9.3 installation as you normally would.
- Place a copy of the converted files back to the $SPECROOT\custom\Events\CsEvFormat and CsPCause directories for each of your SpectroSERVERs and OneClick servers you have upgraded.
- Spectrum reads in the event files at start up. If Spectrum was started prior to copying over the converted files you will need to reload the event files on each of the SpectroSERVERs and OneClick servers that you are running in your environment, or copy the files over then restart the SpectroSERVER and OneClick server.
To Correct Filenames:
If you run into a problem were the filename is incorrect, as described in Step 12. You can use these simple steps to rename the files.
Assuming the file name looks something like Eventffff0001_en_US_en_US.
- Open a DOS prompt or Windows command line
- Change directories to the filesystem containing the file that need to be renamed.
For example, cd C:\Custom-File-Conversion\custom\Events\CsEvFormat
- Use the following command to test the output before actually changing the names:
For /f "tokens=1-3* delims=_" %a in ('dir/b') do echo %a_%b_%c_%d %a_%b_%c
- If the names returned look correct run the following command to change them:
For /f "tokens=1-3* delims=_" %a in ('dir/b') do rename %a_%b_%c_%d %a_%b_%c