data jagan1.s;
input bp$;
cards;
100/90
120/89
112/87
run;
in the above code how to convert character data values to numeric data values?
Answer Posted / hny135
DATA JAGAN1.S1;
SET JAGAN1.S;
X=SCAN(BP,1,'/');
Y=SCAN(BP,2,'/');
A=INPUT(X,3.);
B=INPUT(Y,2.);
DROP BP X Y;
RUN;
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
what is function of retain statment
How to limit decimal places for variable using proc means?
Differentiate between sas functions and sas procedures.
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
What is the difference between %put and symbolgen? : sas-macro
Do you know the features of sas?
What do the put and input function do?
what is hierarchy flattening? : Sas-di
What is SAS?
What are the 3 components in sas programming?
which features do you use to check the data validations and errors? : Sas-administrator
Can you execute a macro within a macro? Describe. : sas-macro
explain about sas business intelligence? : Sas-bi
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
what is sas metadata repository? : Sas-bi