Running SAS Jobs Parallely in Unix

  • Follow


Hi,

I have the following scenario. I want to submit jobs 1 & 2 in parallel
and then after they are done I want to kick off job 3 which uses data
from jobs 1 & 2.
I am trying to automate this on unix..
1. what would be the command in korn shell script to achieve the
result.
2.  Can I've jobs 1 & 2 in one single job and have the sql queries run
parallely if so what is the syntax. Thanks in advance.

job1
------
proc sql;
create table PERSON.Income
as select * from table A;
quit;
run;

job2
------
proc sql;
create table PERSON.Expense
as select * from table B;
quit;
run;

Job3
-------
Data total;
merge Person.income(in=a)  person.expense(in=b);
run;
proc report total..

Regards,
Arjun.
0
Reply Mallikarjun 9/9/2010 8:05:50 PM

On Sep 9, 3:05=A0pm, Mallikarjun B C <mallikar...@gmail.com> wrote:
> Hi,
>
> I have the following scenario. I want to submit jobs 1 & 2 in parallel
> and then after they are done I want to kick off job 3 which uses data
> from jobs 1 & 2.
> I am trying to automate this on unix..
> 1. what would be the command in korn shell script to achieve the
> result.
> 2. =A0Can I've jobs 1 & 2 in one single job and have the sql queries run
> parallely if so what is the syntax. Thanks in advance.
>
> job1
> ------
> proc sql;
> create table PERSON.Income
> as select * from table A;
> quit;
> run;
>
> job2
> ------
> proc sql;
> create table PERSON.Expense
> as select * from table B;
> quit;
> run;
>
> Job3
> -------
> Data total;
> merge Person.income(in=3Da) =A0person.expense(in=3Db);
> run;
> proc report total..
>
> Regards,
> Arjun.

Use SYSTASK you can start JOB1 and JOB2 and WAIT then start JOB3 when
they are done.
0
Reply data 9/9/2010 8:52:30 PM


Hi Arjun

Submit job1 with a '&' at the end so that it runs in the background
and job2 gets started, then use wait, then submit job3

sas.sh <job1>  &
sas.sh <job2>
wait
sas.sh <job3>


Wait can also be used to wait for defined PID's only (all documented
in ksh manuals)

And here some more info (there's lots on the internet):
http://www.ee.pw.edu.pl/~pileckip/aix/wait.htm

HTH
Patrick
0
Reply Patrick 9/9/2010 10:41:06 PM

2 Replies
357 Views

(page loaded in 5.149 seconds)

Similiar Articles:













7/29/2012 9:21:18 AM


Reply: