Hi,
Can someone would love to help me to recognize (extract) the observations in numeric variable only, which contain decimal part.
It would be great, if we can count the decimal digits as well.
1. I have around 300 datasets (tables) with around 1250 variables which need to be investigate to assign format and informat for numeric variable.
2. Some observations are also missing, it means it has ".".
if question is not clear, please let me know. I would try to explain more.
Regards
Uma Shanker Saini
use
if x ne int(x)
to find numbers with decimal parts.
To count the decimal digits:
num_digits=length(scan(put(x,best32.),2,'.'));
Hi,
Please forget about multiple tables, Only one dataset and one variable.
Uma
use
if x ne int(x)
to find numbers with decimal parts.
To count the decimal digits:
num_digits=length(scan(put(x,best32.),2,'.'));
Hi Kurt,
Thanks for your quick response.
Let me verify this one with dummy data...
Hey buddy,
Thanks, it would help a lot, just i need to add some extra fancy things into it.
take care
www.sascertguru.com
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.