DATA Step, Macro, Functions and more

SAS-Parallel Processing in Base SAS

Reply
Occasional Contributor
Posts: 9

SAS-Parallel Processing in Base SAS

Hi,

I need to know if there is  anyway to execute SAS code in parallel.

I am working on BASE SAS 9.1.3 and  rsubmit does not work as i do not have SAS /CONNECT product installed.

Many Thanks

PROC Star
Posts: 7,486

Re: SAS-Parallel Processing in Base SAS

On one machine or multiple machines?  If it is just on one, take a look at: http://www.sas-programming.com/2009/03/leverage-multi-core-with-single-core.html

Occasional Contributor
Posts: 9

Re: SAS-Parallel Processing in Base SAS

Thanks Aurther,

This was helpful. Just another query. Is it possible to execute multiple SAS datasets  parallely inside a SAS code (sadly in BASE SAS 9.1.3 without any features Smiley Sad ).

PROC Star
Posts: 7,486

Re: SAS-Parallel Processing in Base SAS

Not sure what you're asking.  Writing to the same dataset simultaneously, without SAS/Share, would probably be somewhere between problematic and impossible.

Occasional Contributor
Posts: 9

Re: SAS-Parallel Processing in Base SAS

I dont need to write to same Dataset.  I have two datasets X and Y.

data X;

set largefile1;

run;

data Y;

set largefile2;

run;

data Z;

set X Y;

run;

It takes 1 hour for X to complete and 1 hour for Y to complete and 15 mins for appending X and Y and writing to Z.

I need to know if there is any way in base SAS to run data X and data Y parallely  as they are independent of each other that both finish in 1 hour so My code will finish in 1hr 15 mins than 2 hr  15 mins as in sequential access case.

Trusted Advisor
Posts: 3,215

Re: SAS-Parallel Processing in Base SAS

@KarthikR 
Arthur has given usefull information.

No matter you use MP-connect or X-command to run SAS-programs. The SAS-work you have deal with.

- With X-commands (when allowed) you should save datasets to be combined laterl on a permanent location.

  Not the saswork of the session.

- With Mp-connect see: http://support.sas.com/kb/10/903.html yes in the focus area, it is part of SAS/connect (licensing). 

   Mp-connect is starting the session with a SAS-command like the X usage. Iwas wondering weather a sperate license was/is needed

---->-- ja karman --<-----
Occasional Learner
Posts: 1

Re: SAS-Parallel Processing in Base SAS

Depending on what you do in X and Y data steps and how you plan to use the data, use of SAS datastep view could help you avoid unnecessary IO, e.g.:

data X / view=X;

set largefile1;

run;

data Y / view=Y;

set largefile2;

run;

data Z;

set X Y;

run;

This way you skip writing X and Y to disk (physical table).

Alternativelly, you can create Z as a view instead of X and Y.

Occasional Contributor
Posts: 9

Re: SAS-Parallel Processing in Base SAS

rvasil,

I tried with SAS Views and Yes..It helps me avoid unnecessary IO. My question here ,is there any way to make Sequential reading of datasets one after other , parallely in Base SAS (By using Macro or partioning,Multi threading- I have read about these, but dont have clear picture Smiley Sad )

Thanks

Respected Advisor
Posts: 4,173

Re: SAS-Parallel Processing in Base SAS

If you don't have  SAS/CONNECT then you can't run code blocks in parallel and have them communicating with each other. You still can try to split up your program into several programs and then run some of them in parallel.

What you can do is store your datasets using the SPDE engine (defined in the libname statement) and then use preferably SQL code for joining tables. Having your SAS datasets using the SPDE engine allows for multithreading. I've been recently in a project with big tables were using SPDE instead of the normal Base SAS engine made quite a dramatic difference even though only one disk was used for storing the SPDE tables (else performance would have been even better).

Ask a Question
Discussion stats
  • 8 replies
  • 974 views
  • 0 likes
  • 5 in conversation