Prev: How to create 10 deciles using Proc Rank when there are too
Next: how to avoid repeats of title and footnote
From: Ching on 1 Feb 2010 02:39 Hi everyone. May I please ask how to I address the problem of many decimal places so that SAS shows exactly what it is shown in MsAccess? options validvarname=any; libname MsAccess ".....\Data.mdb" scan_textsize=yes use_datetype=yes scan_timetype=yes scanmemo=yes dbmax_text=32767 dbgen_name=dbms; data AB; set MsAccess.AB; run; Many thx in advance!! Have a great week.
From: Kevin Viel on 1 Feb 2010 16:53 On Sun, 31 Jan 2010 23:39:11 -0800, Ching <kcwong5(a)GMAIL.COM> wrote: >May I please ask how to I address the problem of many decimal places >so that SAS shows exactly what it is shown in MsAccess? > >options validvarname=any; >libname MsAccess ".....\Data.mdb" scan_textsize=yes use_datetype=yes >scan_timetype=yes scanmemo=yes dbmax_text=32767 dbgen_name=dbms; >data AB; set MsAccess.AB; run; > >Many thx in advance!! Have a great week. Ching, I am going to guess that SAS is going to have much better precision than Access and that your problem boils down to FORMATs, such as 8.6 versus 15.13, for example. Do you have a specific problem, like different mathematic results? Good luck, Kevin
From: Ching on 2 Feb 2010 19:09 Hi Kevin. At this stage, I just used the round command to those problematic variables. Was wondering if there is any quicker way to address this problem. Thanks for your feedback. Have a great day.
From: Kevin Viel on 5 Feb 2010 11:58
On Tue, 2 Feb 2010 16:09:55 -0800, Ching <kcwong5(a)GMAIL.COM> wrote: >At this stage, I just used the round command to those problematic >variables. >Was wondering if there is any quicker way to address this problem. I would not use round at all. Do not voluntarily lose data (precision). Most of the time, this is false precision, since the measurement tool does not likely have that level of precision, but this is an issue almost complete brushed under the statitical rugs. I would wager that you have not short cut but to list *all* of the variables and their *FORMATs*. Data PERM.One ; Set ODBC.Access_one ; Format age 8.1 BMI 8.2 height_in 8.0 height_ft 8.0 Weight_kg 8.2 ; Run ; Remember FORMATs only affect the way the data are displayed. You may be very wise to use something like: If Round( height_in , 0 ) > 12 Then Put "Inch error " ID= height_in= ; HTH, Kevin |