Statalist The Stata Listserver

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

Re: st: RE: Preserve

From   Fred Wolfe <[email protected]>
To   [email protected], <[email protected]>
Subject   Re: st: RE: Preserve
Date   Fri, 21 Apr 2006 13:47:10 -0500

Thanks, Nick and Gary, both of whom suggested -restore,not-

At 01:06 PM 4/21/2006, Nick Cox wrote:
restore, not

However, I was not interested in not restoring only at the end of the ado file, but also in being able to restore later. Restore,not only cancels the restore at the end of the ado file. but doesn't allow it subsequently as this code shows.

program define testrestore
version 9.2
qui sysuse auto, clear
drop foreign


. restore
nothing to restore

. tab foreign
variable foreign not found

What I wanted to do was to run program A which issues a preserve; run another program and then be able to restore.

What I have to do to get the behavior I want is:

Save a file
make changes
run other programs
reload the saved file - a manual preserve and restore.


[email protected]

Fred Wolfe

> -preserve- when run in an ado file restores at the end of the
> ado file. Is
> there any way to prevent the restore? This functionality is
> available in do files.

*   For searches and help try:

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125     Fax (316) 263-0761
[email protected]

*   For searches and help try:

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