Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problem with save command. Variables disappear in new dataset & workspace.


From   "Benjamin" <[email protected]>
To   <[email protected]>
Subject   st: Problem with save command. Variables disappear in new dataset & workspace.
Date   Mon, 20 Apr 2009 22:52:52 +0200

Dear all,

I have trouble with the save command. Sometimes variables in the workspace
"disappear" when I use the save command. Here is my simple code: 

-------------------
global path2 "Z:\MemoryStick\Income Processes\SAS data sets\STATA
Files\temp"
insheet using "Z:\MemoryStick\Income Processes\Data\Unemployment
Britain\UKUnemployment.csv", clear
save "$path2\ukunemployment.dta", replace
-------------------

The spreadsheet contains only two variables and 38 observations which are
read in fine every time I run the first two lines. If I run all three lines
together I sometimes get the full data set, but sometimes I don't. So either
one of the two variables could be lost in the saving process. If lost, the
variable is not in the saved data set and also disappears from the
workspace. 

As I am quite new to STATA I don't see what's going on. I hope someone has
an idea. 

Thanks a lot, 

Benjamin

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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