CREATE DATABASE Statement is not Silent

Posted by Jeff Ledbetter on 27-Jul-2016 11:26

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.

Posted by Keith Sudbury on 27-Jul-2016 14:45

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.

All Replies

Posted by AdrianJones on 27-Jul-2016 11:35

you could redirect ourput...

$ command > /dev/null

or

$ command > /dev/null 2>&1

to surpress errors too

Posted by Jeff Ledbetter on 27-Jul-2016 11:44

This is happening via the CREATE DATABASE statement in code.

Posted by marian.edu on 27-Jul-2016 11:44

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?



Marian Edu

Acorn IT 
+40 740 036 212

Posted by Jeff Ledbetter on 27-Jul-2016 11:59

"..does it hurt when it does this"

Yes, it screws up the UI on the screen.

Posted by marian.edu on 27-Jul-2016 12:10

ah, good old chui… why can’t you just redirect the output to /dev/nul or some dummy file while executing the statement?


Marian Edu

Acorn IT 
+40 740 036 212

Posted by Jeff Ledbetter on 27-Jul-2016 12:15

"..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..

Posted by marian.edu on 27-Jul-2016 12:44

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 ;)



Marian Edu

Acorn IT 
+40 740 036 212

Posted by Keith Sudbury on 27-Jul-2016 14:45

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.

Posted by Rob Fitzpatrick on 27-Jul-2016 14:59

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

Posted by Jeff Ledbetter on 27-Jul-2016 15:23

"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.

This thread is closed