Hi,

I like to schedule a DOS program to be executed and during the executing
time, it will take a predefined input and direct the output to a file.

basically, the DOS program is SQLIO, downloadable from Microsoft. I
following its document to do the series of ios
sqlio -kW -s10 -frandom -o8 -b8 -LS -Fparam.txt
timeout /T 60 > c:\out.log
sqlio -kW -s360 -frandom -o8 -b64 -LS -Fparam.txt
timeout /T 60
>> c:\out.log

but, it won't complete. the c:\out.log was created. there is nothing in
there. neither was it seemed executing sqlio at all.

is there special command to DOS program in general to redirect output to a
file?

thanks.

Re: scheduleing a DOS program by Pegasus

Pegasus
Thu May 08 00:49:17 CDT 2008


"light_wt" <lightwt@discussions.microsoft.com> wrote in message
news:867DD21C-8FA5-425F-9048-A11AD9C8DF9A@microsoft.com...
> Hi,
>
> I like to schedule a DOS program to be executed and during the executing
> time, it will take a predefined input and direct the output to a file.
>
> basically, the DOS program is SQLIO, downloadable from Microsoft. I
> following its document to do the series of ios
> sqlio -kW -s10 -frandom -o8 -b8 -LS -Fparam.txt
> timeout /T 60 > c:\out.log
> sqlio -kW -s360 -frandom -o8 -b64 -LS -Fparam.txt
> timeout /T 60
>>> c:\out.log
>
> but, it won't complete. the c:\out.log was created. there is nothing in
> there. neither was it seemed executing sqlio at all.
>
> is there special command to DOS program in general to redirect output to a
> file?
>
> thanks.

DOS is a legacy operating system that was first released some
30 years ago. It is now only rarely used. You were probably
executing your command in a Command Prompt under Windows XP
or perhaps Vista. There is no DOS under WinXP or Vista.

Before you redirect the output from your command to a file, you
should run it without redirection so that you can see what
happens, e.g. like so:

@echo off
sqlio -kW -s10 -frandom -o8 -b8 -LS -Fparam.txt timeout /T 60
sqlio -kW -s360 -frandom -o8 -b64 -LS -Fparam.txt timeout /T 60

If you do see some output then perhaps the author of sqlio.exe
made a mistake and generated only "error" output. You could then
try this:
@echo off
sqlio -kW -s10 -frandom -o8 -b8 -LS -Fparam.txt timeout /T 60 2> c:\out.log
sqlio -kW -s360 -frandom -o8 -b64 -LS -Fparam.txt timeout /T 60 2>>
c:\out.log



Re: scheduleing a DOS program by lightwt

lightwt
Thu May 08 12:14:00 CDT 2008

thanks for your suggestion.

i've tried the two different ways outlined.

first i had @echo off in the first line of the batch file with the sqlio in
the 2nd line and so on. things are fine; i see output to the screen and the
program completed, as well as the batch file.

i then kept the @echo off and append the
> c:\out.log
to the 2nd line and so on.

the file has got created. but, there is nothing in there. output doesn't
show on the command prompt window either.

what is wrong after adding the > c:\out.log and stopped outputing anything?

Re: scheduleing a DOS program by Pegasus

Pegasus
Thu May 08 16:00:08 CDT 2008


"light_wt" <lightwt@discussions.microsoft.com> wrote in message
news:5D50A23B-8DBD-4B17-AEAD-E7FA3AAD8EF6@microsoft.com...
> thanks for your suggestion.
>
> i've tried the two different ways outlined.
>
> first i had @echo off in the first line of the batch file with the sqlio
> in
> the 2nd line and so on. things are fine; i see output to the screen and
> the
> program completed, as well as the batch file.
>
> i then kept the @echo off and append the
>> c:\out.log
> to the 2nd line and so on.
>
> the file has got created. but, there is nothing in there. output doesn't
> show on the command prompt window either.
>
> what is wrong after adding the > c:\out.log and stopped outputing
> anything?

Whether the first line is "@echo on" or "@echo off" is immaterial.
This command has a totally unrelated purpose.

Run the following batch files and report the result:

Batch File 1
========
@echo off
dir c:\ /ad

Batch file 2
=======
@echo off
echo %date% %time% > c:\out.log
dir c:\ /ad >> c:\out.log
notepad c:\out.log