Hi.
On *Nix, the CREATE DATABASE statement always outputs to the terminal:
"procopy session begin..."
Any idea on how this can this be suppressed?
Thanks.
All CREATE DATABASE seems to do is call prodb (possibly procopy) for you. Here are some options:
1) Hack prodb/procopy to redirect the output (probably not a good idea).
2) Log a bug/ehancement with TS to make the NO-ERROR option hide those messages like it does for errors.
3) Use OS-COMMAND to call the appropriate prodb command for Unix/Windows instead of using CREATE DATABASE.
you could redirect ourput...
$ command > /dev/null
or
$ command > /dev/null 2>&1
to surpress errors too
This is happening via the CREATE DATABASE statement in code.
or just stop staring at that console for a minute and grab a coffee… does it hurt when it does this, if yes in which way?
"..does it hurt when it does this"
Yes, it screws up the UI on the screen.
ah, good old chui… why can’t you just redirect the output to /dev/nul or some dummy file while executing the statement?
"..why can’t you just redirect the output to /dev/nul or some dummy file while executing the statement?"
That is what we tried originally but it doesn't seem to redirect the output. Maybe we are doing it wrong..
I see, so output to doesn’t change anything… then only option would be to use os-command with silent, the statement looks like it’s doing something similar anyway but you should be able to find out more details from the TS guys if you open a case ;)
All CREATE DATABASE seems to do is call prodb (possibly procopy) for you. Here are some options:
1) Hack prodb/procopy to redirect the output (probably not a good idea).
2) Log a bug/ehancement with TS to make the NO-ERROR option hide those messages like it does for errors.
3) Use OS-COMMAND to call the appropriate prodb command for Unix/Windows instead of using CREATE DATABASE.
Here's an example from 11.3. The ABL code 'create database "c:\dir\foo"' invokes procopy with the following command line:
c:\OE\11.3\bin\_dbutil procopy -NOREPL "c:\OE\11.3\empty.db" "c:\dir\foo.db" -relative -silent
"All CREATE DATABASE seems to do is call prodb (possibly procopy) for you".
My thought as well. :)
Yep, #3 was our work-around. I was just hoping there was some undocumented secret parameter to CREATE DATABASE but I guess that probably isn't the case.
Thanks everyone for the input.