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


Please Help Members By Posting Answers For Below Questions

What is the difference between nodupkey and nodup options?

595


What is the use of function Proc summary?

655


How can sas program be validated?

577


What is substr function?

626


Describe the function and untility of the most difficult SAS macro that you have written.

1560






I have a dataset concat having variable a b & c. How to rename a b to e & f?

580


Describe a time when you were really stuck on a problem and how you solved it?

2205


Mention what is SAS data set?

677


What can you learn from the SAS log when debugging?

921


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

749


WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?

2265


what is change analysis in sas di ? : Sas-di

606


What is the role of administrative users? : sas-grid-administration

660


What is the work of tranwrd function?

668


Mention the validation tools used in SAS?

658