Give an example where SAS fails to convert character value to numeric value automatically?



Give an example where SAS fails to convert character value to numeric value automatically?..

Answer / Priyanshu Varshney

In the following example, SAS fails to convert a character value 'apple' to a numeric value because of different data types:

```
data example;
input fruit $;
if fruit = '5';
then x = 1;
run;
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

what is sas? is a package or tool? give me introduction about sas?

11 Answers   Accenture,


what are the validation tools in sas?

3 Answers   TCS,


what is conditional processing?

4 Answers   Accenture,


i have a dataset with var1,var2,var3; i want to upload the titles for the variables . How can we?

1 Answers   GSK,


data abc; input x y ; cards; 1 2 5 6 7 8 7 8 1 7 5 7 ; run; Proc Freq data=abc; tables x*y / chisq nopercent nocol norow PLCORR; RUN; If we run the code, we have Polychoric Correlation = 0.9054 in the last table. I want to extract this particular entry with the value. Means I will create one dataset in which this value will be stored/extracted. I need your help in coding this. Please help me out.

2 Answers  


is QUALCOMM using SAS ?

1 Answers  


Where do the database management systems store data and how do u import them.

2 Answers   L&T,


How to find out no. of business days in a month using macros.???(excluding weekends and holidays).

2 Answers   HSBC,


how do we mail reports from SAS environment to our team leader

5 Answers   Wockhardt,


what is broad cast agent? : Sas-bi

1 Answers  


Name and describe three SAS functions that you have used, if any?

2 Answers  


what is the use of LRECL option.

1 Answers   L&T,


Categories