Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ucbvax.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!info-vax
From: info-vax@ucbvax.ARPA
Newsgroups: fa.info-vax
Subject: Re: cpu stats and i/o redirect
Message-ID: <5161@ucbvax.ARPA>
Date: Fri, 1-Mar-85 17:38:29 EST
Article-I.D.: ucbvax.5161
Posted: Fri Mar  1 17:38:29 1985
Date-Received: Sat, 2-Mar-85 05:06:26 EST
Sender: daemon@ucbvax.ARPA
Organization: University of California at Berkeley
Lines: 37

From: Gail Rubin 

To redirect the input, reassign sys$input. And, to redirect output,
reassign sys$output. A sample of commands to do this:
$   assign/user sys$disk:[myplace]stdin.dat sys$input
$   assign/user sys$disk:[myplace]stdout.dat sys$output
$   run myprogram

OR, if you are going to run it from a command file, you could leave
out the re-assignment of sys$input and put the input into the
command file itself, after the call to the program, but WITHOUT dollar
signs in col 1. The input ends at the end of the file or at the first
line which starts with a dollar sign. And you could redirect the output
by doing so with the command that runs the command file, e.g.:

$   ! this is runmine.com
$   set noverify
$   run myprogram
line 1 of input
line 2 of input
line 3 of input
$   ! this line is not part of the input to myprogram

Run it with:
    @runmine/outp=stdout.dat

CPU time is a bit harder. Do you have control of the program - can
you modify it? There are routines for doing timing in the run time
library, see LIB$STAT_TIMER and LIB$INIT_TIMER. 

But those require programming. Off the top of my head I cannot
think of a program that times others. But there may be something -
I'm sure if there is someone will respond with the answer.

-- Gail Rubin
(grubin@bbn-spca or @bbn-unix)