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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 1154 views
  • 0 likes
  • 2 in conversation