Connect:Direct RUN TASK using VBS script is hanging

Technote (troubleshooting)


Problem(Abstract)

A RUN TASK using CMD() to call a VBS file name never completes.

Symptom

Windows prevented the VBS script from running. Instead Windows opened a GUI and prompted the user for manual interaction. Since the RUN TASK is non-interactive, the GUI will never be visible to the user and thus keeps sitting in the background forever. This is the root cause for RUN TASK "hanging".

The issue only occurred when calling a VBS file name using the CMD() parameter, like

RUN TASK SNODE (PGM=Windows)
    SYSOPTS="cmd(C:\test.vbs)"

Cause

This is not a product issue. The issue was confirmed to be due to an external 3rd-party application (CMD.EXE) hanging. Called in the RUN TASK, this may leave Connect:Direct waiting for the external application to exit.

Diagnosing the problem

A Connect:Direct session manager trace shows

... sdms_run_task_program entered

but not

... sdms_run_task_program exited successfully

Starting with IBM Sterling Connect:Direct for Windows 4.6.0.2_iFix013, the trace also shows time-outs while waiting for the external application to exit:

... sdms_run_task_program: waiting for runtask timed out. ProcessID=4284, elapsed 30(s)


Resolving the problem

Modify the RUN TASK to call cscript.exe in batch mode (//B) directly.

Examples:

RUN TASK SNODE (PGM=Windows)
  SYSOPTS="cmd(cscript.exe //B C:\test.vbs)"

RUN TASK SNODE (PGM=Windows)
  SYSOPTS="pgm(C:\Windows\System32\cscript.exe) args(//B C:\test.vbs)"


Rate this page:

(0 users)Average rating

Document information


More support for:

Sterling Connect:Direct for Microsoft Windows

Software version:

4.4, 4.5, 4.6

Operating system(s):

Windows

Reference #:

1625254

Modified date:

2013-02-13

Translate my page

Machine Translation

Content navigation