LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Jul 2004 10:21:19 -0400
Reply-To:     Frank Ivis <FIvis@CIHI.CA>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Frank Ivis <FIvis@CIHI.CA>
Subject:      Re: about dbms/copy and stat/transfer
Content-Type: text/plain; charset="iso-8859-1"

I also had the same theory when I had a STATA file converted to SAS, and it almost tripled in size. But when I viewed the contents, most numerics had a length of 3, so it would seem that something else is causing the size increase or there were errors in the conversion. Although I could perform the initial PROC CONTENTS, I also received an error:

ERROR: Read Access Violation In Task ( CONTENTS ] Exception occurred at (67E691D3) Task Traceback

Any subsequent attempts to read the data resulted in error message:

ERROR: Protected resource may be inconsistent

I will be trying some other methods to convert the data.

Frank

****************************************************** Date: Fri, 16 Jul 2004 17:30:22 -0400 From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV> Subject: Re: about dbms/copy and stat/transfer

I had more or less the same theory.

It may be that the variables need to be maintained as numerics. It is possible with SAS to force as storage length of less than 8 bytes for numeric variables, but it's tricky business.

Another strategy is to follow Chang's advice, then create a view to do the expansion and conversion on the fly. Something like:

proc sql; create view mylib.bloated as select input(something,1.) as something, [more of the same] from mylib.compact ; quit;

On Fri, 16 Jul 2004 15:14:51 -0400, Chang Y. Chung <chang_y_chung@HOTMAIL.COM> wrote:

>On Fri, 16 Jul 2004 11:24:02 -0700, william <smartie_zhuo@HOTMAIL.COM> >wrote: > >>HI,there >>I have a STATA file ,its size is 9,336k,If I transfer it to SAS type >>by stat/transfer,after transfer,its size is 24,481k,if i use >>DBMS/COPY,then its size is 44,084,I try to understand why its has >>different size by different software and why it has so huge difference >>in its size.the last question,can i have any way to reduce the size by >>DBMS/COPY,because i have no such huge hard disk. > >Hi, > >I suspect that stat/transfer may be translating stata's "float" type >variables into sas's numeric variables of length 4, while DBMS/COPY does >create sas's numeric variable of length 8. > >If your variables are numerical, but the (en)coded, categorical, type >(e.g. 1 for "male" and 2 for "female"), then you can convert them to >character variables before transfer and save some of the spaces. > >HTH. > >Cheers, >Chang


Back to: Top of message | Previous page | Main SAS-L page