Chapter Contents

Previous

Next
SORT

SORT



Sorts observations in a SAS data set according to the values of one or more variables

OS/390 specifics: available OS/390 sort utilities and SORT procedure statement options; host-specific SAS system options


Details
SORT Procedure Statement Options
See Also


Details

You can direct the SORT procedure to use either the SAS sort program, which is available under OS/390 and under all other operating environments or a sort utility that is specific to OS/390. You can also use the SORTPGM= system option to tell SAS to choose the best sort program to use. (See SORTPGM=.)

The following SAS system options also affect any sorting that is done by SAS:

DYNALLOC SORTEQOP SORTSHRB
FILSZ SORTLIB= SORTSIZE=*
SORT= SORTLIST SORTSUMF
SORTALTMSGF SORTMSG SORTUADCON
SORTBLKMODE SORTMSG= SORTUNIT=
SORTBUFMOD SORTNAME= SORTWKDD=
SORTCUTP= SORTOPTS SORTWKNO=
SORTDEV= SORTPARM= SORT31PL
SORTDEVWARN SORTPGM=
SORTDUP=* SORTSEQ=*
*Options marked with an asterisk (*) are either portable or portable with host specifics. For information on these options, begin with SAS Language Reference: Dictionary.

You can see the value of the preceding options by submitting:

proc options group=sort; run;


SORT Procedure Statement Options

The following host-specific sort options are available in the PROC SORT statement under OS/390 in addition to the statement options that are available under all host operating environments. The list includes the portable EQUALS option because it has aspects that are specific to OS/390.

DIAG
passes the DIAG parameter to the sort utility. If the utility supports this option, then it will produce additional diagnostic information if the sort fails.

EQUALS
passes the EQUALS parameter to the sort utility program whether or not the sort utility supports it. The SAS System defaults to EQUALS by passing the parameter to the utility if the SAS system option SORTEQOP is in effect.

LEAVE=n
specifies how many bytes to leave unallocated in the region. Occasionally, the SORT procedure runs out of main storage. If this happens, rerun the job and increase the LEAVE= value (which has a default value of 16000) by 30000.

LIST | L
provides additional information about the system sort. Not all sort utilities support the specification of the LIST option; they may require that it be specified when the sort utility is generated or installed. This option is the default action if the SAS system option SORTLIST is in effect. Also, this option overrides NOSORTLIST if it is in effect.

MESSAGE | M
prints a summary of the system sort utility's actions. This option is the default action if the SAS system option SORTMSG is in effect. Also, this option overrides NOSORTMSG if it is in effect. MESSAGE is useful if you run PROC SORT and the SAS log prints a message indicating 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
specifies the maximum virtual storage that can be used by the system sort utility. If not specified, the default sort size is given by the SAS system option SORTSIZE=.

SORTWKNO=n
specifies how many sort work areas PROC SORT allocates. If not specified, the default is given by the SAS system option SORTWKNO=.

TECHNIQUE=xxxx | T=xxxx
specifies a four-character sort technique to be passed to the system sort utility. SAS does not check the validity of the specified value, so you must ensure that it is correct.


See Also


Chapter Contents

Previous

Next

Top of Page

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