*Copyright @ www.mycsg.in;
Creating a sample dataset
Understanding sort sequence of character variables in SAS
Create a dataset named series01_sort01 by sortint series01 dataset based on ascending sequence of 'var' variable
Roughly the sort order of appears to be:
- Symbols
- Digits: Within digits, numbers starting with a digit are grouped together
- Upper case letters
- Lower case letters
Modifying the sorting sequence of character variables using sortseq=option
Group lower case and upper case letter together
- LINGUISTIC option can be used to sort the lower case and upper case letters together
Group lower case and upper case letter together and give preference to lowercase letters
- LINGUISTIC option can be used to sort the lower case and upper case letters together
- case_first= suboption can be used provide preference for lower and upper case letter
- LOWER option has to be used on case_first= suboption
Group lower case and upper case letter together and give preference to upper case letters
- LINGUISTIC option can be used to sort the lower case and upper case letters together
- case_first= suboption can be used provide preference for lower and upper case letter
- UPPER option has to be used on case_first= suboption
Sort character digits based on their numeric value
- LINGUISTIC option can be used to sort the lower case and upper case letters together
- NUMERIC_COLLATION= suboption can be used provide preference for lower and upper case letter
- ON option has to be used on numeric_collation= suboption