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:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.