Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



data study; input Subj : $3. Group : $1. Dose : $4. Weight : ..

Answer / 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 ?    3 Yes 0 No

data study; input Subj : $3. Group : $1. Dose : $4. Weight : ..

Answer / 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

More SAS Interview Questions

code the tables statement for a single level frequency?

2 Answers  


how can u convert this 25-jul-2010 from numeric to charcter?

3 Answers  


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

0 Answers  


what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?

2 Answers   Wockhardt,


Tell e how how dealt with..

0 Answers  


How would you define the end of a macro?

0 Answers  


What does the trace option do?

0 Answers  


We want to merge file A and B. File A has variable age, file B provide birthdate. How to merge the data according to age in file B

3 Answers  


what type of graphs we will create(for 2+years candidates)?

0 Answers   Accenture, Icon,


I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.

4 Answers  


Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain.

4 Answers   Accenture,


what are the categories that sas informats are used to the place the data? : Sas-administrator

0 Answers  


Categories