Hi can anyone help me with OS-COMMAND? I am trying to write ABL code to run a windows .exe file and pass it three parameters, two of the parameters contain a variable. So I have been building up a CHAR variable and running;
DEF VAR cParams AS CHAR NO-UNDO.
cParams = "\\SERVER1\FOLDER\PROGRAMS\DocBuild.exe \\SERVER1\FOLDER\INPUT\TEMP.docx \\SERVER1\FOLDER\INPUT\" + cInputFile1 + ".xml" + " \\SERVER1\FOLDER\OUTPUT\" + cInputFile1 + ".docx".
OS-COMMAND VALUE(cParams).
But it refuses to run. I don't get any error message and I get no output.
I have seen references to createprocessA but that seems to be VB based. What am I doing wrong?
Does cInputFile1 contain spaces or other special characters? Can you show the entire command?
A few KBs that may or may not be related to your problem...
Try: OS-COMMAND VALUE("echo " + cParams).
Or try to run the command line directly from a Windows command prompt, outside of OpenEdge.
If that fails as well, there's something wrong with the command line itself.
(I assume you know a valid value for the cInputFile1 variable to test with).
Hi Frank,
On 27 Aug 2015, at 09:32, Frank Meulblok <bounce-fmeulblo@community.progress.com> wrote:Reply by Frank MeulblokOr try to run the command line directly from a Windows command prompt, outside of OpenEdge.
If that fails as well, there's something wrong with the command line itself.
(I assume you know a valid value for the cInputFile1 variable to test with).
Stop receiving emails on this subject.Flag this post as spam/abuse.
Hi George,
On 27 Aug 2015, at 05:43, George Potemkin <bounce-GeorgeP12@community.progress.com> wrote:Reply by George PotemkinTry: OS-COMMAND VALUE("echo " + cParams).
Stop receiving emails on this subject.Flag this post as spam/abuse.
Thanks MadDBA,
On 27 Aug 2015, at 00:15, TheMadDBA <bounce-TheMadDBA@community.progress.com> wrote:Reply by TheMadDBADoes cInputFile1 contain spaces or other special characters? Can you show the entire command?
A few KBs that may or may not be related to your problem...
Stop receiving emails on this subject.Flag this post as spam/abuse.
The idea with "echo " is to see an exact string your program passes to OS. Did you see a console screen? Is it what you expect to pass to OS?