Help using Base SAS procedures

Reg-- Dots

Reply
N/A
Posts: 0

Reg-- Dots

Hi

i am having data with dots i want the data before the dots only,if there are no dots then the data should come exactly and the variable is in character.

data emi_mth;
input emi$;
cards;
423.23659
4523
4,255.233
46,569.236
45.1
4.2369
1.36985
run;

the output should be like this and varible shd be in numeric
emi
423
4523
4255
45
4
1
N/A
Posts: 0

Re: Reg-- Dots

data emi_mth;
input emi$;
emi1=scan(emi,1);
emi2=scan(emi,2);
cards;
423.23659
4523
425.233
45.1
4.2369
1.36985
run;


got it
Ask a Question
Discussion stats
  • 1 reply
  • 102 views
  • 0 likes
  • 1 in conversation