Kbase 17301: Can You Use OS-COMMAND With WebSpeed 2.x
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/01/2008 |
|
Status: Unverified
FACT(s) (Environment):
WebSpeed 2.x
FIX:
You cannot run os-command directly in a Webspeed application if you are expecting output from the os-command. You can use the INPUT THROUGH with a system call to handle the output as in the following example:
DEFINE VARIABLE ch AS CHARACTER NO-UNDO.
OUTPUT TO outfile.txt.
FOR EACH customer WHERE name BEGINS 'l':
DISPLAY name.
END.
INPUT THROUGH wc outfile.txt.
REPEAT:
IMPORT UNFORMATTED ch.
{&OUT} html-encode(ch) SKIP.
END.
*** Please note that INPUT THROUGH is for NT and UNIX only Another option would be to do an OS-command SILENT to do something in the background. But you still need to define the output device even if the command has no output. An example:
OUTPUT TO temp.tmp.
OS-COMMAND rmdir dirname.
OUTPUT CLOSE.