BookmarkSubscribeRSS Feed
nrose
Quartz | Level 8
Hi,

When opening up data tables, I often need to look at the underlying codes of a variable. I know you can change the format of a column to nothing in read write mode to see the underlying variable lables, but is there a quicker and easier way to switch off formatting so you see the underlying values?

Thanks,

Nick
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You can use varying techniques with the SAS FORMAT statement, such as:

FORMAT _CHARACTER_ ;
FORMAT _NUMERIC_;
FORMAT _ALL_ ;
FORMAT MYVAR: ;

See example execution below.

Scott Barry
SBBWorks, Inc.


24 data x;
25 retain a 'A' b 100;
26 format a $HEX2. b hex4.;
27 putlog _all_;
28 run;

a=41 b=0064 _ERROR_=0 _N_=1
NOTE: The data set WORK.X has 1 observations and 2 variables.


29 data y;
30 set x;
31 format _all_ ;
32 putlog _all_;
33 run;

a=A b=100 _ERROR_=0 _N_=1
NOTE: There were 1 observations read from the data set WORK.X.
NOTE: The data set WORK.Y has 1 observations and 2 variables.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 851 views
  • 0 likes
  • 2 in conversation