Help using Base SAS procedures

Sort Execution Failure

Reply
Super Contributor
Posts: 318

Sort Execution Failure

Hi,

I have 3 greenplum tables (1.2 million recs,100+ numeric fields) each and then joined together with some small sas tables for lookup and then grouped by id. I have to run this process every month and from time to time I am able to process it successfully. But recently I have been hitting a sort execution failure when processing the join. MEMSIZE is already set to 8G(max) ever since. I have playing around with sortsize 1G, 2G up to 4G and this chunk still fails.

In terms of disk space of SAS server, we still have around 60gb in space. So I believe this shouldn't be much of an issue.

Greatly appreciate any advise on how to address this problem.

Thanks!

Super User
Posts: 6,936

Re: Sort Execution Failure

Do you join in PROC SQL or with a DATA step? If SQL, try sorting with PROC SORT and doing a DATA step MERGE.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: Sort Execution Failure

Try using tagsort option in the sort statement.

Super User
Posts: 3,105

Re: Sort Execution Failure

What is the sort error message? Sorts can fail for a variety of reasons.

PROC Star
Posts: 1,561

Re: Sort Execution Failure

Be careful, it is not MEMSIZE that matters here, it is REALMEMSIZE: you do not normally want your sort runs to use paging.

Here is how these options interact:

Untitled.png

Figure taken from High-Performance SAS Coding: Polychrome: Christian Graffeuille: 9781514362310: Amazon.com: Books

PROC Star
Posts: 1,561

Re: Sort Execution Failure

You can also use the details option to have more insight into what your proc sort is doing.

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