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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.