[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: OS-COMMAND Escape Ampersand Inconsistency

  • Thread starter Thread starter ChUIMonster
  • Start date Start date
Status
Not open for further replies.
C

ChUIMonster

Guest
I don't see any ampersands or carets in your example. What am I missing? The kbase isn't very clear about it but, as I read it, the problem is that you need an os-appropriate escape character in the string passed to the operating system that is executing the command. Different operating systems use different escape characters. ^ is an escape character for Windows CMD shells. It does not function as an escape for any UNIX shell. And it does not function as an escape for 4gl code either. I think what is probably happening is that your app servers are running on Windows and your web brokers are running UNIX. If that is correct then you also have the problem of "\" being the wrong path delimiter for UNIX and ".exe". Something like this should work for you: if opsys = "windows" then os-command value( "your windows command with ^ as an escape" ). else os-command value( "your unix command" ). In 4gl code "~" is the most appropriate escape character. "\" is problematic because windows code thinks it is a path delimiter but UNIX code thinks it is an escape.

Continue reading...
 
Status
Not open for further replies.
Back
Top