Technical Blog Post
Abstract
Troubleshooting your Run Task in Connect:Direct for Microsoft Windows
Body
Have you ever run a Connect:Direct process and everything comes up zeros in the return codes but your Run Task step didn’t do what you expected?
It was supposed to delete or archive the source file but after the process completes there the file sits, still in the source directory.
You go look at the statistics and you see no errors to tell what did or didn’t happen.
How do you get a handle on what happened?
As an example, you have a process with a Run Task similar to:
STEP10 RUN TASK PNODE (PGM=Windows)
SYSOPTS="cmd(del c:\outbound\prod_file.txt)"
When you run your process you discover that the file c:\outbound\prod_file.txt has not been deleted.
You check the statistics and don’t find a message giving any useful information, now what?
Try modifying the step to be:
STEP10 RUN TASK PNODE (PGM=Windows)
SYSOPTS="cmd(del c:\outbound\prod_file.txt >> c:\temp\delfile.log 2>~&1)"
This will create a log file called delfile.log, in this case in the C:\Temp directory.
The log file will contain both stdout and stderr messages.
The messages in the log file should help diagnose the problem with the Run Task step.
UID
ibm11123977