This code
ods listing;
proc iml;
names = {Jenny, Linda, Jim, Samuel};
print names;
quit;
ods listing close;
produces output with capital letters, why?
The SAS System
names
JENNY
LINDA
JIM
SAMUEL
When you specify a matrix of character values, use quotes if you want to preserve case. Otherwise the values are UPCASEed. So to preserve case, use
names = {"Jenny", "Linda", "Jim", "Samuel"};
If you read data from a data set, you'll automatically get whatever case is in the data:
use sashelp.class;
read all var {"Name"};
close sashelp.class;
print Name;
When you specify a matrix of character values, use quotes if you want to preserve case. Otherwise the values are UPCASEed. So to preserve case, use
names = {"Jenny", "Linda", "Jim", "Samuel"};
If you read data from a data set, you'll automatically get whatever case is in the data:
use sashelp.class;
read all var {"Name"};
close sashelp.class;
print Name;
Well, thanks, I doubt I would have found that in the help files.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.