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.
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))
Please show us a screen capture. Use the "Insert Photos" icon to include your screen capture in your reply. Do NOT attach files.
Okay, thank you
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))
You can use the option "order":
proc contents data=want order=ignorecase;
run;
This worked too; thank you sir.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.