SORTSHRB System Option: z/OS

Specifies whether the host sort interface can modify data in buffers.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Sort: SORT
PROC OPTIONS GROUP= SORT
Default: SORTSHRB for all modes except batch; NOSORTSHRB for batch mode
z/OS specifics: All

Syntax

SORTSHRB | NOSORTSHRB

Required Arguments

SORTSHRB
specifies that two or more tasks are likely to be sharing the data in buffers. If SORTSHRB is in effect, the host sort interface cannot modify data in buffers but must move the data first. Moving the data before modifying it could have a severe performance impact, especially for large sorts.
SORTSHRB is the default value for the windowing environment, interactive line mode, and noninteractive mode, where it is quite likely that multiple tasks use the same data.
NOSORTSHRB
specifies that no tasks share the data in buffers. If NOSORTSHRB is in effect, the host sort interface can modify data in buffers. NOSORTSHRB is the default value for batch mode because it is unlikely that buffers are shared during batch jobs, where larger sorts are usually run. If not sharing buffers between tasks is not suitable for your batch environment, be sure to specify SORTSHRB.

Details

SAS data sets can be opened for input by more than one SAS task (or window). When this happens, the buffers into which the data is read can be shared between the tasks. Because the host sort interface needs to modify the data before passing it to the host sort utility, and by default does this directly to the data in the buffers, data can be corrupted if more than one task is using the data in the buffers.