data study;
input Subj : $3.
Group : $1.
Dose : $4.
Weight : $8.
Subgroup;
x= input(Weight,5.1);
datalines;
001 A Low 220 2
002 A High 90 1
003 B Low 193.6 1
004 B High 165 2
005 A Low 123.4 1
;
Why does X get truncated? X shows up as 22 instead of 220,9
instead of 90 and 19.8 instead of 198? This problem doesnt
happen with the values 193.6 and 123.4.
This does not happen if x is read on the 5. informat instead
of the 5.1 informat
Answer Posted / kumaraswamy maduri
Informat 5.1 or 5.2 tell the SAS processor to allocate
specified number of decimals from right to left of the
value and the remaining to the number.
Informat 5. is good if you have one decimal even this fails
when you have more than one decimal.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is proc Index? and what is proc document?
Difference between nodup and nodupkey options?
Explain what is SAS informats?
Which date function advances a date, time or datetime value by a given interval?
How is character variable converted into numeric variable and vice versa?
What is the basic structure of the SAS base program?
what are several options for creating reports in web report studio? : Sas-bi
What sas features do you use to check errors and data validation?
What function CATX syntax does?
what is information maps?
What are the five ways to do a table lookup in sas? : sas-grid-administration
hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?
for what purpose would you use the retain statement? : Sas programming
what is the difference between unique key and primary key? : Sas-di
Explain data step in SAS