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
how do you pull data from equifax?tell me the process?
Can you explain the process of calendar?
If a variable contains letters or special characters, can it be numeric data type?
What would be the value of month at the end of data step execution and how many observations would be there?
how many types of prompts are there? : Sas-bi
What is the maximum length of the macro variable? : sas-macro
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
List out some key concept of SAS
What is the role of unrestrictive users? : sas-grid-administration
how are numeric and character missing values represented internally? : Sas programming
Explain bmdp procedure?
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
explain the function of substr in sas? : Sas-administrator
What are the advantages of using sas?
How do dates work in SAS data?