>> Home >> Resources & support >> FAQs >> Stata 5: Using ado-files before STB-7
Note: This FAQ is for users of Stata 5, an older version of Stata. It is not relevant for more recent versions.

Stata 5: I just downloaded and installed an ado-file from an early STB (before STB-7), and I am having trouble running it. What’s wrong?

Title   Stata 5: Using ado-files before STB-7
Author Paul Lin, StataCorp

To make programs from STB-7 and before work, and in general to make programs intended for Stata 2.1 and before (May 1992) work, you must edit the file and make one minor change.

If the file is an ado-file (ends in “.ado”), edit the file and near the top you will see

        program define ...

Insert a line immediately following the program define:

        program define ...
                version 2.1

save the file as an ASCII (text) file. It will now work.

If the file is a do-file (ends in “.do”), edit the file and add the version 2.1 line right at the top. Remember to save the file as an ASCII (text) file.

You need only do this with files from STB-7 and before (May 1992 and earlier). After that, the files published in the STB include the appropriate version statement, and Stata will know how to execute them properly.

Note: If you write do-files or ado-files and you want to ensure that they continue to work with the future versions of Stata, you should include version statements. For example:

        version #

following program define in ado-files and as the top line in do-files.





The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ YouTube
© Copyright 1996–2017 StataCorp LLC   •   Terms of use   •   Privacy   •   Contact us