Kbase P41424: How to run PROWIN32.EXE with -param from OS-COMMAND passing
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/11/2003 |
|
Status: Unverified
GOAL:
How to run PROWIN32.EXE with -param from OS-COMMAND passing a file as parameter and the filename contains spaces.
FACT(s) (Environment):
Progress 9.1D
FACT(s) (Environment):
Windows 2000 client
CAUSE:
If you try to do the following from the procedure editor.
OS-COMMAND prowin32.exe -param File Name.p.
And the File Name.p contains a space you will reach error:
There is no server for database <Arg1>. (1423)
There is no server active for the database, and you tried to access it in multi-user mode. Either access it single-user mode or start a server running for it and retry connecting to the database.
The File Name.p containing the space is interpretted by Progress like if you are passing several parameter and this will lead to the error.
FIX:
There is 2 easy workarounds for been able to achieve it.
1. by defining a variable that will containg the string you want to pass and make sure that the File Name.p containing the space will be considered as a single parameter.
DEFINE VARIABLE MYVAR AS CHAR INIT "-param ""my file.p""".
OS-COMMAND SILENT PROWIN32.EXE VALUE(MYVAR).
OR
2. Without defining any variable directly in the OS-COMMAND call.
OS-COMMAND SILENT PROWIN32.EXE "-param ""my file.p""".
Remember that the directory where the file is located should be in the Propath or put the full path before the file Name.