Chapter Contents

Previous

Next
SORTWORK=

SORTWORK=



Defines locations for host sort work files

Language element: system option
Default: none
Valid in: configuration file, SAS invocation, OPTIONS statement, System Options window, VMS_SAS_OPTIONS DCL symbol
OpenVMS specifics: number of work files specified


Syntax
Details
See Also

Syntax

SORTWORK=<libref>;
SORTWORK=path;
SORTWORK=(<libref1> | path1,<libref2> | path2, ... <libref10> | path10)
NOSORTWORK

libref
specifies a data library. Librefs must be assigned using a LIBNAME statement. When more than one libref is specified, they must be enclosed in parentheses.

path
specifies an OpenVMS pathname. The value for path must be enclosed in single or double quotation marks.

NOSORTWORK
deassigns the librefs or paths assigned using SORTWORK=.


Details

The SORTWORK= system option lets users specify up to ten work files for the OpenVMS host sort. The paths and librefs defined in the SORTWORK= system option are assigned to the OpenVMS logical names SORTWORK0 through SORTWORK9. The OpenVMS host sort uses these logical names to determine where to create the host sort work files.

You can specify the NOSORTWORK option to deassign the logical names that are set using SORTWORK=. Otherwise, they stay assigned until the SAS session is terminated.

The SORTWORKn logical names are not assigned during options processing. They are assigned during processing of the SORT procedure. The same applies to deassigning the logical names. If you specify OPTIONS NOSORTWORK, the deassigning of the logical names will not take place until another SORT procedure is submitted.

The SORT procedure option, SORTWKNO=, overrides SORTWORK=. SORTWKNO= enables the user to specify how many work files the host sort should use. Valid values range from 0 through 6. No matter how many sort work file locations have been assigned through SORTWORK=, the number that is specified with SORTWKNO= determines how many of the locations are used.

Since the SORTWKNO= option is limited, you can use the OpenVMS maximum of 10 sort work files by defining SORTWORK0 through SORTWORK9. If you specify locations with SORTWORK=, the SAS System will tell the sort utility how many work files to create (one per location). If you specify some number of SORTWORK= locations, but do not want to use them all for a particular PROC SORT command, use SORTWKNO= in the SORT procedure to specify exactly how many to use.

If you specify fewer SORTWORK locations than the number that was specified with SORTWKNO=, the extra work files will be created in SYS$SCRATCH.

Specifying no SORTWKNO= and specifying SORTWKNO=0 have the same effect: if SORTWORK= locations have been defined, all those locations will be used. If they have not been defined, 0 will be sent to the sort utility as the number of work files; this is the OpenVMS default. The default action is to create a work file if needed.

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.