BookmarkSubscribeRSS Feed
KarthikR
Calcite | Level 5

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

8 REPLIES 8
art297
Opal | Level 21

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

KarthikR
Calcite | Level 5

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 ).

art297
Opal | Level 21

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

KarthikR
Calcite | Level 5

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.

jakarman
Barite | Level 11

@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 --<-----
rvasil
Calcite | Level 5

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.

KarthikR
Calcite | Level 5

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

Patrick
Opal | Level 21

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).

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 2777 views
  • 0 likes
  • 5 in conversation