![]() Chapter Contents |
![]() Previous |
![]() Next |
| The TRANTAB Procedure |
| Procedure features: |
| |||
| Other features: |
|
This example shows how to specify a different translation table to sort data in an order that is different from the default sort order. Characters that are written in a language other than U.S. English may require a sort order that is different from the default order.
Note: You can use the
TRABASE program in the SAS Sample Library to create translation tables for
several different languages.
| Program |
options nodate pageno=1 linesize=80 pagesize=60;
| | data testsort; input Values $10.; datalines; Always always Forever forever Later later Yesterday yesterday ; |
| | proc sort; by values; run; proc print noobs; title 'Default Sort Sequence'; run; |
| SAS Output |
|
Output from Sorting Values with Default Translation Table
The default sort sequence sorts all the capitalized words in alphabetical order before it sorts any lowercase words. |
|
|
|
| | proc sort sortseq=upper; by values; run; proc print noobs; title 'Customized Sort Sequence'; run; |
| SAS Output |
|
Output from Sorting Values with Customized Translation Table
The customized sort sequence sorts all the words in alphabetical order, without regard for the case of the letters. |
|
|
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.