Prorest Output redirection to File on MSDOS

allanm

New Member
Hi,

I want to do an automatted restore of databases using prorest command. To analyse whether the prorest was sucessful i need to redirect output of prorest to a file. This works fine in Unix / Linux , but does not work in Windows.

In Windows prorest command displays the program output on the screen even if i give output redirection to a file using ">" operator.

I am using ,
Progress 8.3D CHUI version
Windows 98

Any body know how to get around this problem

Thanks in advance


-Allan
 
Perhaps it is because prorest is a batch file. Try running it directly instead:

"%DLC%\bin\_dbutil" prorest > test.txt

If that does not work it may be because the text is output directly to the screen (unlikely) or to a different stream. Generally, there are 3 different streams:

1 Standard Output
2 Standard Error
3 Standard Print

In DOS, you can specify which stream that you want to redirect by placing a number before the chevron. E.g. to redirect stdout:

"%DLC%\bin\_dbutil" prorest 1> test.txt

to redirect stderr:

"%DLC%\bin\_dbutil" prorest 2> test.txt

or you can do both at the same time to different files:

"%DLC%\bin\_dbutil" prorest 1> normal.txt 2> error.text
 
Back
Top