BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
Hi,
I have 30 datasets that are to be sorted and then merged later.I heard there somethng about multi threading where we can sort all 30 data sets at once instead of sorting one after the other.Please help me on this.
7 REPLIES 7
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
How about the SAS DOC and the SAS Support website to start?

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic/post:
sort multiple threads site:sas.com
Peter_C
Rhodochrosite | Level 12
SASPhile
what Scott (SBB) is hoping you will find is referred to in many papers as mpConnect for multi-processing connect. Including this topic the "scalability" focus area, is well worth visiting at http://support.sas.com/rnd/scalability/index.html
.
peterC
SASPhile
Quartz | Level 8
I tried to emulate the code shown in sas support but i got these following errors:

ERROR:A communication subsystem partner link setup request failure has occurred.
ERROR: Cannot locate TCP host 'TASK1'.
ERROR: Remote signon to TASK1 cancelled.

The code I used is:


options autosignon=yes sascmd="sas";
signon task1 userid=sasprod;

/* create TASK1 SAS session to sort the SALES data */
rsubmit task1 wait=no sysrputsync=yes;
proc sort data=sashelp.shoes out=shoes1;
by product;
run;
/* get TASK1's WORK library path in parent session */
%sysrput pathtask1=%sysfunc(pathname(work));
endrsubmit;
signon task2 userid=sasprod;

/* create TASK2 SAS session to sort the GOALS data */
rsubmit task2 wait=no sysrputsync=yes;
proc sort data=sashelp.steel out=steel1;
by steel;
run;
/* get TASK2's WORK library path in parent session */
%sysrput pathtask2=%sysfunc(pathname(work));
endrsubmit;
Peter_C
Rhodochrosite | Level 12
SASPhile
"getting started with SAS/Connect" needs a little more than the example that you have found.
"signon" works as long as there is somewhere "listening" - so have you a sas server with a service listening for your "signon"?
I suspect not.
You will find many benefits for design and performance of your systems once the SAS/Connect services can be started, but it requires some unusual learning, and probably help from a system administrator for whom setting up system services, like a sas connect listener, is "ordinary".

Good luck
peterC
SASKiwi
PROC Star
As well as following Peter's advice I would suggest contacting your SAS Server administrator and/or knowledgeable SAS users at your site. Usually they know what configuration is required to signon. Usually it involves specifying the IP address of the SAS server and what TCP/IP port to communicate on.

BTW the example you have is right on the money. You may also find the WAITFOR statement useful.
Doc_Duke
Rhodochrosite | Level 12
The multi-threading is within one SORT. To use it on 30 datasets requires first combining the datasets. Probably better to do 30 sorts.
SASKiwi
PROC Star
The only way of doing concurrent sorting (or any process for that matter) that I am aware of is by doing it in separate SAS sessions. If you have SAS/CONNECT then you can create several asynchronous SAS sessions each doing their own processing in parallel/concurrently then get the parent SAS session to wait until all your child sessions have finished processing.

This is probably only worth doing on a server with the I/O capacity to cope. On a desktop machine the first sort would tend to dominate the disk drive and all of the other concurrent sorts would be very slow.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 7 replies
  • 1013 views
  • 0 likes
  • 5 in conversation