Trying to sort a very large dataset using PROC SORT and it is throwing unusual error

StackOverflow https://stackoverflow.com/questions/23274108

  •  09-07-2023
  •  | 
  •  

Question

Running this piece of code on LINUX and dataset is on MAINFRAME and has 60000000+ obs...

proc sort data=test_history force;
by acct score;
run;

I'm getting this following error...

NOTE: There were 67397829 observations read from the data set test_HISTORY.
435 ERROR: Failure while merging sorted runs from utility file 1 to final output.
436 ERROR: Failure encountered during external sort.
437 ERROR: Attempt to communicate with server AMDAHL refused by server.  The current request failed.
438 NOTE: The SAS System stopped processing this step because of errors.
439 NOTE: SAS set option OBS=0 and will continue to check statements. This might cause NOTE: No observations in data set.
440 WARNING: The data set test_HISTORY may be incomplete.  When this step was stopped there were 20002488 observations and 148
441          variables.
442 ERROR: The connection to server AMDAHL has been lost.  The current request failed.  This error may reoccur on subsequent requests.
Was it helpful?

Solution

Refer to this SUGI paper

Several options are indicated to reduce the probability of getting an error when proc sorting a large dataset in the mainframe environment. I have pasted one option below.

This code limits the number of sort work areas in the SAS code...use SOTWKNO option either as a global option or as a PROC SORT option. This option determines the maximum number of sort work areas that PROC SORT is allowed to use.

options SORTWKNO=3;
proc sort test_history SORTWKNO=5;
by acct score;
run;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top