- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 12-08-2017 05:29 AM
(1695 views)
data have;
input a $;
cards;
acc>>>
qe
12.3hjj
78.0
88
run;
Required output;
12.3
78.0
88
I have written in this way:
data have;
input a$;
a1=compress(a,'1234567890.','k');
cards;
acc>>>
qe
12.3hjj
78.0
88
run;
Is there any other way?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
you can do this
a1=compress(a,'','kpd');
What do you want to do when a does not contain numbers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Missing when it contains character, special characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would be fine with a missing observation