data loss after saving

#1
Hello,

I merged monthly data in stata with the following commands:

Code:
use jan00
append using febr00
append using march00
append using april00
append using may00
append using june00
append using july00
etc
After I checked the data, I get >2M observations and 10 variables, which is fine.

Contains data from jan00.dta
obs: 2,340,846
vars: 10
size: 196,631,064 (80.8% of memory free)
But after I save the data I only have 9 variables:

Contains data from C:\***\master.dta
obs: 2,340,846
vars: 9
size: 177,904,296 (82.6% of memory free)
Does anybody know how this is possible? I also tried so save it every time I merge a new month, but that doesn't work either. In the end I still have 9 variables instead of 10.
 
#3
This is really weird. I tried it again and used the same code as yesterday, only a different name when I saved it. Don't understand it, but the problem is gone. I now have 10 variables and no data loss after saving.
 
#5
I still have a weird problem, and I don't know what is causing this problem.
I have monthly .dta files now. When I imported them, I checked for missing observations and when they were missing I deleted them. I total there were like 250 missing observations (I have >2M observations so that is a very small number).

Then I merge every file using " append" .

Code:
use jan00
append using febr00 
etc
I would assume that it is not possible that I have missing observations right now, because I dropped them all. However, this is my result when I use "mdesc"

Variable | Missing | Total | Missing/Total
------------------------------------------------------------
transactio~s 80149 2.3e+06 .03432
RekeningID 42900 2.3e+06 .01837
PERFABS 203779 2.3e+06 .087259
TotalOrders 129722 2.3e+06 .055548
StockOrders 27394 2.3e+06 .01173
DerivaOrders 223104 2.3e+06 .095535
gross_perf~e 103198 2.3e+06 .04419
net_perfor~e 97007 2.3e+06 .041539
turnover_s~s 203497 2.3e+06 .087139
date 133076 2.3e+06 .056984
Does somebody have any tips what I could try to fix this problem. I could drop these observations (it's only 10%) However, they were not really missing before I merged them.

edit: I already found out what the problem is. Stata drops variables from the montly dta's after saving them. It happens in >50% of the files I have. Therefore, I have so many missing variables!
edit2: I was using stata 10. So, i tried stata 11 now and it works. So, stata 10 was the problem for me.
 
Last edited: