BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PrinceAde
Obsidian | Level 7

Hi everyone.

Please I need help with proc contents;

I'm trying to view the content of  a data set.

proc contents data=want;

run;

In the output, the heading says Alphabetic List of Variables and Attributes, however, the variables were not arranged alphabetically. 

 

Thank you.

 
 
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

In the collating sequence of the ASCII code, capital letters appear before lowercase letters. That's why it's not a good idea to mix cases in variable names, unless you use it for specific reasons (i.e. I used it to separate variables coming in from the production DB (uppercase) vs. those created in the data warehouse during the ETL process (lowercase))

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Please show us a screen capture. Use the "Insert Photos" icon to include your screen capture in your reply. Do NOT attach files.

--
Paige Miller
PrinceAde
Obsidian | Level 7

 

Okay, thank you

Kurt_Bremser
Super User

In the collating sequence of the ASCII code, capital letters appear before lowercase letters. That's why it's not a good idea to mix cases in variable names, unless you use it for specific reasons (i.e. I used it to separate variables coming in from the production DB (uppercase) vs. those created in the data warehouse during the ETL process (lowercase))

andreas_lds
Jade | Level 19

You can use the option "order":

 

proc contents data=want order=ignorecase;

run;

 

PrinceAde
Obsidian | Level 7

This worked too; thank you sir.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1762 views
  • 1 like
  • 4 in conversation