DATA Step, Macro, Functions and more

Formats when viewing dataset

Reply
N/A
Posts: 0

Formats when viewing dataset

I have a dataset with formats, 1=Male, 2=Female. When I open the dataset or use proc print, all I see is "Male" and "Female", but I would rather see the 1 and 2. Is there a way to change the options for viewing or do I have to remove the formats?
Super Contributor
Super Contributor
Posts: 3,174

Re: Formats when viewing dataset

Specify a FORMAT statement with your variable name and leave off the output format parameter, as in:

FORMAT MY_VAR ;

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Formats when viewing dataset

So is there no way to remove it when I view the dataset? Most of the time I like to just click on the dataset to view it instead of using proc print.
Super Contributor
Super Contributor
Posts: 3,174

Re: Formats when viewing dataset

Yes, right-click on the column to change the attribute FORMAT.

Scott Barry
SBBWorks, Inc.
Valued Guide
Posts: 2,175

Re: Formats when viewing dataset

use sas system viewer to examine the data set.
It has a button/icons for formatted and unformatted views. It has other good features too.
Ask a Question
Discussion stats
  • 4 replies
  • 118 views
  • 0 likes
  • 3 in conversation