SORTSEQ= System Option: UNIX, Windows, and z/OS

Specifies a language-specific collating sequence for the SORT and SQL procedures to use in the current SAS session.
Valid in: configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Sort: Procedure options
PROC OPTIONS GROUP= SORT

Syntax

SORTSEQ=collating-sequence

Syntax Description

collating-sequence
specifies the collating sequence that the SORT procedure is to use in the current SAS session. Valid values can be user-supplied, or they can be one of the following:
  • ASCII
  • DANISH (alias NORWEGIAN)
  • EBCDIC
  • FINNISH
  • ITALIAN
  • NATIONAL
  • POLISH
  • REVERSE
  • SPANISH
  • SWEDISH

Details

To create or change a collating sequence, use the TRANTAB procedure to create or modify translation tables. When you create your own translation tables, they are stored in your PROFILE catalog, and they override any translation tables with the same name that are stored in the HOST catalog.
Note: System managers can modify the HOST catalog by copying newly created tables from the PROFILE catalog to the HOST catalog. All users can access the new or modified translation tables.
If you are in a windowing environment, use the Explorer window to display the SASHELP HOST catalog. In the HOST catalog, entries of type TRANTAB contain collating sequences that are identified by the entry name.
If you are not in a windowing environment, issue the following statements to generate a list of the contents of the HOST catalog. Collating sequences are entries of the type TRANTAB.
proc catalog catalog=sashelp.host;
   contents;
run;
To see the contents of a particular translation table, use these statements:
proc trantab table=translation-table-name;
   list;
run;
The contents of collating sequences are displayed in the SAS log.

Example

This example demonstrates the functionality of SORTSEQ with PROC SORT and PROC SQL:
options sortseq=reverse;                                                        
proc sort data=sashelp.class out=foo1;                                          
by name;                                                                        
run;                                                                            
proc sql;                                                                       
create table foo2 as select * from sashelp.class order by name;
quit;
run;

See Also

System Options: