BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I am creating a data set and enter data.

The data is

.001
0.01
10
100
10.0

My question is how can I know which informat should I use?

 

3 REPLIES 3
Kurt_Bremser
Super User

Maxim 1: Read the Documentation.

Go to documentation.sas.com, select "SAS 9.4 and SAS Viya 3.4 Programming Documentation", navigate to "Data Step Programming", "Formats and Informats", "SAS Informats", "Dictionary of Informats", select "Informats by Category". Scroll down to "Numeric".

 

Usually, you will use the simple w. informat (eg 7.) and see if that does it. If it doesn't, see if you find one that's applicable. It's granted that >90% of the information you'll read while browsing the documentation is not applicable at the moment, but most of it will end up in the back of your brain and come to the fore in a later moment when you'll need it.

 

Many times you will just have to swap the meaning of a dot and a comma (data from German-speaking countries), so you'll use the commax informat.

Astounding
PROC Star
You don't need to use any informats. SAS "understands" numbers, so you can simply use:

data want;
input x;
datalines;
.001
0.01
10
100
10.0
;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 791 views
  • 2 likes
  • 3 in conversation