Sorry, I wasn't clear in my original post. The DIR command was only used
as an initial test and it was run (and did create a spoolfile) as
expected. But the directory/folder it listed was c:\Windows\System32.
The program that I'm try to run exists in another folder and requires the
working directory to be that folder. I have created a batch file which
issues as CD to the correct working folder and then calls the program.
This also works successfully but my boss has asked me to eliminate the
batch file if possible.
So what I'm asking is if when the RUNRMTCMD runs if the working directory
can be set so the batch file (which sets the working directory) can be
I hope this is clear and sorry for the earlier confusion.
On 2013-09-27 2:54 PM, Dan Kimmel wrote:
When you're using RUNRMTCMD, you generally don't want to pipe output to a local file as you have here, Rob. Instead let the dir command write to stdout as usual. The REXEC service will stream the output back to the RUNRMTCMD which will then put the output in a spool file on the IBMi.
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Friday, September 27, 2013 1:46 PM
To: Midrange Systems Technical Discussion
Subject: Re: Help setting up RUNRMTCMD...
Try figuring it out just like I did.
Go to your Windows command prompt.
Type in help and hit enter.
Lots of commands, right?
Now try: help start
start /d \users dir
will switch to the \users directory and run the command dir
Now I couldn't get
start /d \users dir >dirout.txt
like I expected. It created that file back in the starting directory, and
it only had zero bytes