Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Compress and saveold


From   "Gauri Khanna" <[email protected]>
To   [email protected]
Subject   st: Compress and saveold
Date   Sat, 20 Jan 2007 19:20:15 +0000

Dear List members,

I sent a stata dataset created in version 9.2 to a stata 8 user who ran into the 80 characters limit problem for string variables. As you know, Stata 8 only supports 80 characters on string variables whereas the dataset I created in version 9.2 has a couple of string variables that are in excess of 80.

1. So I tried to compress these variables. But when I look at them again using the -describe- command I find no difference in their length? Does that mean that these variables are not compressed or cannot be compressed?

Here is the output I get on the 10 variables that I compress:

-compress gm_fun_o comments gm13_o gm12_o gm10c_o gm10a_o gm9b_o gm8_o gm7_o gm4c-
-des gm_fun_o comments gm13_o gm12_o gm10c_o gm10a_o gm9b_o gm8_o gm7_o gm4c-

storage display value
variable name type format label variable label
-------------------------------------------------------------------------------
gm_fun_o str102 %102s GM_FUN_O
comments str244 %244s COMMENTS
gm13_o str168 %168s GM13_O
gm12_o str107 %107s GM12_O
gm10c_o str165 %165s GM10C_O
gm10a_o str137 %137s GM10A_O
gm9b_o str162 %162s GM9B_O
gm8_o str160 %160s GM8_O
gm7_o str175 %175s GM7_O
gm4c str244 %244s GM4C

These are exaclty of the same length prior to compressing!

I also eyeballed the data to see if there are leading and trailing blanks but unfortunately I do have some observations that fill in the entire string length. So I cannot use -trim-, -ltrim-, and -substr()-.

2. I have used the command -saveold GM- where GM is the name of my dataset but am not sure if that will work. Do any of you know about -saveold- solving the problem?

I look forward to your response.

Regards,

Gauri

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index