Sorts observations in a SAS data set
CMS specifics: |
SORT procedure statement options
|
Under CMS, the SORT procedure uses the
EBCDIC collating sequence. For general information about the SORT procedure
see
SAS Procedures Guide.
You can direct the SORT procedure to use either the
SAS sort program, available under CMS and under all other operating environments,
or a sort utility specific to CMS, or you can allow SAS to choose the best
sort program to use. You make this choice with the SORTPGM= system option.
See System Options in the CMS Environment
for details on the SORTPGM= option and the other system options that affect
the SORT procedure. These system options include the following:
- FILSZ
- specifies whether the SORT procedure being
used supports the FILESIZE parameter. See FILSZ.
- SORTCUT=
- specifies the number of observations above which the external
sort program is selected when the SORTPGM=BEST system option is specified.
See SORTCUT=.
- SORTCUTP=
- specifies the data set size (in bytes) above which the sort
program is selected when the SORTPGM=BEST option is specified. See
SORTCUTP=.
- SORTEQOP
- specifies whether the SORT procedure being
used supports the EQUALS parameter. See SORTEQOP.
- SORTLIB=
- specifies the TXTLIB to be made global for
PROC SORT use. See SORTLIB=.
- SORTLIST
- indicates whether SAS is to pass the LIST
parameter to the SORT package being used (to request additional information
about the sort process). See SORTLIST.
- SORTMSG
- indicates whether SAS is to indicate to
the SORT package to write all messages or just those that are critical. See SORTMSG.
- SORTNAME=
- specifies the name of the host sort utility. See SORTNAME=.
- SORTPARM=
- specifies a string to be appended to the OPTION statement
that is passed to the host sort program. See SORTPARM=.
- SORTPGM=
- specifies the name of the host sort program. See
SORTPGM=.
- SORTSIZE=
- specifies what value SAS is to pass to the
SORT package being used to indicate the maximum virtual storage to be used.
See SORTSIZE=
-
SORTSUMF
- indicates whether the SORT package being
used supports the SUM FIELDS= parameter. See SORTSUMF.
- SORT31PL
- controls whether SAS software calls the host sort program
by using the extended (31-bit) plist or standard (24-bit) plist. See SORT31PL.
The following host-specific sort options
are available in the PROC SORT statement under CMS in addition to the sort
options available on all hosts. Note that the list includes the portable
EQUALS option because it has aspects specific to CMS.
-
DIAG
- passes the DIAG option to the host sort
program. The interpretation of the DIAG option is entirely up to the host
sort program; it has no effect on SAS. This option is recognized only when
the system option SORT31PL is in effect.
-
EQUALS | NOEQUALS
- passes the EQUALS or NOEQUALS option to
the host sort program regardless of the setting of the SAS system option SORTEQOP.
-
LEAVE=n
- adjusts the value of the storage parameter
passed to the host sort program.
If SORTSIZE=SIZE is in effect, SAS estimates the size
of the largest contiguous block of available storage, then subtracts the values
of the system option LEAVE= and of the SORT procedure statement option LEAVE=,
and passes the resulting value to the host sort. Note that the calculations
are based on the size of the largest block of storage, whether it is above
or below the 16M line. If the host sort is AMODE 24, however, SAS will consider
only storage below the line. Some host sorts may allocate work storage only
below the line even if they are AMODE 31, in which case the size estimated
by SAS can be misleading.
If SORTSIZE=n is in effect, the LEAVE=
value is subtracted from the SORTSIZE value.
For other values of SORTSIZE=, the LEAVE= option has
no effect.
-
LIST | L
- passes the LIST option to the host sort
program. The interpretation of the LIST option is entirely up to the host
sort program; it has no effect on SAS. This option is ignored unless the
system option SORT31PL is in effect.
-
MESSAGE | M
- passes the PRINT=ALL option to the host
sort program. The MESSAGE option is useful if you run PROC SORT and the SAS
log prints a message that the sort did not work properly. Explanations of
the message can be found in the IBM or vendor reference manual that describes
your system sort utility.
-
SORTSIZE=n | nK |
nM
| nG | MAX | SIZE | nK | nM | nG | MAX | SIZE
- specifies the maximum virtual storage that
can be used by the system sort utility. If not specified, the default is
given by the SORTSIZE= SAS system
option.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.