[STATA] - Deleting variables without opening dataset

#1
Does anyone know how I can delete variables in a dataset before opening it in STATA. I am using a large survey dataset and there are more variables than STATA allows so it won't open. The error message that comes up also suggests that I drop some variables however, in the STATA help, I was not able to figure out how to do that without actually opening the dataset. I was, however, able to describe the dataset without opening it which leads me to think it might be possible. Can anyone help with this?

Many thanks from a novice Stata user
 

Link

Ninja say what!?!
#2
It appears the dataset was created some other way since STATA can't open it without getting rid of some variables. What software was used to create it? You might have to refer to that software to delete the variables.
 
#3
It appears the dataset was created some other way since STATA can't open it without getting rid of some variables. What software was used to create it? You might have to refer to that software to delete the variables.
It's a DHS dataset, nationally representative so very large. I'm not sure how it was created. There is a version of STATA that allows for more variables but not the one I'm using (11.0). I have been opening it in SPSS and deleting individual variables until it gets to the number STATA will open but it's very time consuming and I have more than one dataset to deal with so I'm trying to find a quicker way.
Thanks.
 
#4
There are some tricks to open large datasets with Stata. If you want to look at the variables in your dataset you can limit the number of observations with smtg like this:

use * if _n == 1 using dataset.dta

On the other hand, once you know exactly the name of the variables you are interested in, you can write smtg like:

use var1 var2 etc. using dataset.dta

Finally, if you need a large number of variables and a large number of observations you can use temporary files (as long as you don't have to estimate a model with all variables and observations).

Hope this helps!

Etienne