As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tip of the Day:January 3

From sasCommunity
Jump to: navigation, search

sasCommunity Tip of the Day

When writing programs, SAS ignores the case of variable names. However when it comes to display the variables names, say with Proc CONTENTS, then the case does matter for the sorting of the variable names.

Proc CONTENTS provides the ORDER= option to sort the variable names in different ways. See the code sample below on how the ORDER= option affects the variable name sorting.

data work.myvars;
  length 
    Aa aa2 aa1 Aa10
    Bb bb2 bb1 Bb10
    Zz zz1 Zz10
    $ 8
  ;
run;
title "variables names sorted with the default";
ods select variables;
proc contents data=work.myvars;
run;
 
title "variables names sorted with order=ignorecase";
ods select variables;
proc contents data=work.myvars order=ignorecase;
run;
 
title "variables names sorted with order=casecollate";
ods select variables;
proc contents data=work.myvars order=casecollate;
run;



Submitted By Md4



Feel free to comment on this tip.


Prior tip - Next tip - Random Tip

Submit a Tip