BookmarkSubscribeRSS Feed
vijaysas777zx
Calcite | Level 5

I want to delete all the datasets in a library that are in lowercase and propcase or that are not in upcase

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

First question: Why? 

 

Secondly, I am not sure if this is possible. As far as I know, SAS stores data set names in lowercase internally. However, someone may be smarter than me 🙂

Kurt_Bremser
Super User

Datasets in SAS are always stored as lowercase in the operating system and displayed as uppercase within the SAS applications.

Even when using this

data sascomm.'Some XXXX'n;
set sashelp.class;
run;

the file in the operating system is

some xxxx.sas7bdat

and shows up as

SOME XXXX

in the library in the server list on EG.

 

 

PS This test was done on a UNIX system, which has a real case-sensitive file system (as opposed to the Windows toyboxes).

RW9
Diamond | Level 26 RW9
Diamond | Level 26

You would need to get a listing from the operating system for doing such a thing, the metadata defaults to all uppercase for names.

I would also ask with @PeterClemmensen, why?  Doesn't make sense.  I understand that linux/unix treats upper/lower case differently, and Windows doesn't, but if you need all uppercase (and personally I would go the other way and say all lowercase), then they should be created that way by some sort of company policy?

Maybe a batch script for your OS would be a simple method to go about it.  Maybe:

https://superuser.com/questions/65302/is-there-a-way-to-batch-rename-files-to-lowercase

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 731 views
  • 0 likes
  • 4 in conversation