vasili111
vasili111

Reputation: 6940

Exiting Stata without saving changes in data

I use the code below to load a dataset into memory:

use D:\d\all_vars_ready.dta , clear

Is there a way to prevent Stata from asking "save changes in data" before exiting?

Ideally, I would like to do this from within a do file.

Upvotes: 0

Views: 654

Answers (1)

user8682794
user8682794

Reputation:

The following works for me interactively:

exit, clear

This command will close Stata without asking to save any changes in the dataset.

From within a do file, you also need to specify the STATA option:

exit, clear STATA

Upvotes: 1

Related Questions