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
Which command is used to save logs in the external file?
what is star schema? : Sas-di
what are sas/access and sas/connect? : Sas programming
describe about metadata object? : Sas-di
Give some ways by which you can define the variables to produce the summary report (using proc report)?
What is the difference between reading data from an external file and reading data from an existing data set?
Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?
what is sas data set?
Mention the validation tools used in SAS?
How do dates work in SAS data?
What do the mod and int function do? : Sas programming
Explain what is the use of proc gplot?
how are numeric and character missing values represented internally? : Sas programming
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
what are the component of range? : Sas-bi