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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.