Date: Sat, 27 May 2000 22:17:04 -0700
Reply-To: kmself@IX.NETCOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: kmself@IX.NETCOM.COM
Subject: Re: Batch mode
In-Reply-To: <no.id>; from kalisetty558@CS.COM on Fri, May 26,
2000 at 08:39:14PM +0000
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
On Fri, May 26, 2000 at 08:39:14PM +0000, Kalisetty558 wrote:
> Hello all
>
> I want to run number of programs(say 10) at once. I run a single program by
> typing "SAS program name" at the command prompt.. But, how to run 10 programs
> by a single command?
> We have SAS in a UNIX(AIX) environment and version 6.12.
If you have access to the 'at' scheduling utility, you can enter a list
of commands, followed by a <cntrl>-D (control key plus D, noted "^D"),
to schedule a list of commands:
$ at now
> sas myprog1
> sas myprog2
.
.
.
> sas myprog 10
^D
...schedules your job to run "now". 'cron' and 'batch' are alternate
schedulers.
You can run a series of commands from the command line too:
$ ( sas mprog1; sas myprog2; ... ; sas myprog10 ) &
...runs the jobs in a subshell of current shell. This syntax assumes
bourne, korn, POSIX, or bash shells. The csh and tcsh use a different
syntax.
You can also create and execute a shell script:
$ cat <<EOF > runsas.scr
> #!/bin/sh
> sas myprog1
> sas myprog2
> ...
> sas myprog10
> EOF
$ chmod 544 myprog10
$ ./myprog10 &
...creates a shell script (as a 'here' document), makes it executable,
and runs it.
...More than one way to skin this cat.
--
Karsten M. Self <kmself@ix.netcom.com> http://www.netcom.com/~kmself
Evangelist, Opensales, Inc. http://www.opensales.org
What part of "Gestalt" don't you understand? Debian GNU/Linux rocks!
http://gestalt-system.sourceforge.net/ K5: http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0
[application/pgp-signature]