Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: RE: save9.ado updated to run in Stata 12


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: RE: save9.ado updated to run in Stata 12
Date   Wed, 26 Oct 2011 13:27:41 +0100

Thanks, Marco. I have to say that I don't read this as answering most of my questions. 

As you say, -save- is not subject to version control, so, as I said, any particular version of Stata can only -save- to the present format and to the previous format, which I think falls far short of the flexibility you appear to be promising. Whether your program will work on a variety of versions is not in question, and not the answer, I believe. 

Nick 
[email protected] 

Marco Ercolani

Apologies for the failure to specify the Stata-8 limitation of the procedure.
The help file for save9 does start with the statement "save9 - Save dataset
in Stata-9 format regardless of whether Stata 9, 10, 11 or 12 is being run."
and there is also a later note about the fact that it "... will also work in
Stata-8 ...". I hope this satisfies the first point.

With regard to the second point. I admit this is a humble attempt at Stata
programming but I hope it is not entirely without merit. It all started out
when I was trying a version-independent way of saving data to the Stata-9
format at the end of do files I was sharing with co-authors who were running
different versions of Stata. I did attempt the obvious approach of:
 version 9.2
 save Data.dta, replace
However, the version command has no effect on save command. I therefore
needed a sequence of commands based on the "c(stata_version)" code do
identify which version any user was running. At this point it just became
obvious to write this up in an .ado file and share it.

From: Nick Cox <[email protected]>

This may sound an attractive aim, but you omit, perhaps because it is
obvious to you, an explanation that -save9- does not, and can not, do
all that your opening sentence proclaims. specifically let "any
version of Stata save the dataset into a specific version number".

First, -save9- requires Stata 8 up. Second, any -save- to what can be
read by an older version omits data details that make no sense to that
version (there are partial exceptions, I think, but that's the
pattern). Whether that is important will vary. Third, you can at most
- -save- to the same format or downwards. Fourth, any given Stata
version as far as I am aware only offers handles to -save- to the
current format and the previous so the fact that your program works on
Stata 8 up doesn't give it that much flexibility because the
particular version it runs on will have only two choices.

I am with Joerg on this: I don't understand the rationale of -save9-.
(I am generously credited with a code comment, but I still don't
understand the aim.) If I am missing something, I would be glad to
know.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index