IBM Support

Windows Run Command gives unpredictable results

Troubleshooting


Problem

Attempts to execute programs on Windows using the Run Command action in IBM Rational Integration Tester (RIT) fail or give incorrect output.

Symptom

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.

Cause

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:

    chcp
    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 8.5.0.2 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"


Note:

International character support was added in version 8.5.0 but fix was made in version 8.5.0.2. Windows Server 2003 was returning no output in the Run Command action. See APAR PM96806.

[{"Product":{"code":"SSBLQQ","label":"IBM Rational Test Workbench"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Rational Integration Tester","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21665141