Attempts to execute programs on Windows using the Run Command action in IBM Rational Integration Tester (RIT) fail or give incorrect output.
You might see one of the following:
- Commands do not return anything
- Commands give an error status
- Commands appear to hang
- International characters are not displayed correctly
- The same commands run correctly in a separate cmd window.
Some of the above problems have been seen with the Windows find command.
In order to support international characters, from version 8.5.0 of RIT the Run Command actions uses code page 65001. This is the UTF-8 character set.
Note that the code page is not set on Windows XP or Vista, it uses the system default.
Some commands might not work correctly with this code page.
Diagnosing the problem
- Open a command window on your system and run the chcp command to see which is the default code page:
Active code page: 437
- Use the Test button in the Run Command action to see how the command executes before running it within your test.
Resolving the problem
Update to RIT version 22.214.171.124 or newer.
If problems persist, explicitly set the code page in the Run Command with chcp.
The following example sets the code page and ensures that the output chcp is discarded:
chcp 437 > nul 2>&1
netstat -e -r | find "Bytes"
International character support was added in version 8.5.0 but fix was made in version 126.96.36.199. Windows Server 2003 was returning no output in the Run Command action. See APAR PM96806.