Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • - cdo - now on SSC: for those who like to -do- things differently

    The main inspiration for this command was frustration. Often I'd start a long dofile and move on, only for it to crash after 5 lines because of some stupid coding mistake. Likewise, I've lost many computer-hours due to network issues causing the server to lose access to the dofile and just stopping dead in its tracks. This, and many other problems can be fixed by using this command.

    As you might have guessed, cdo is an alternative to do. So instead of do greatDofile.do, you can now cdo greatDofile.do . Why would you do that?
    1. If you specify a valid sendtoslack URL, you will get smartphone updates when the dofile crashes or finishes.*
    2. Stata will run a copy of your dofile instead of the original, ensuring you can always make updates to the dofile while its running and that network issues don't mess you up when working on an external server.
    3. You can ask Stata to run a program upon crash/finish, for example to log out of the pay-per-minute server or inform you through some alternative means than sendtoslack.
    4. Automatically generate logfiles, optionally with a timestamp in the name.
    5. Any and all options can be saved, so that they become the default.
    Examples on how to do all that are in the help file. You can download this command through ssc using ssc install cdo.

    Let me know if you encounter any bugs or would appreciate certain additional functionality.

    * Setting up sendtoslack is easy, taking less than 5 minutes.

  • #2
    Oh this is nifty! Thanks!

    Comment


    • #3
      Warning: currently using cdo will execute all your dofiles as if you're running Stata 8.0. In the update en route to SSC, the program resets your version before it actually starts your dofile to avoid this issue. I have attached it here for those who can't wait.

      PS: I discovered this because apparently in earlier versions of Stata, clear behaved like clear all and I couldn't find my matrices.
      Attached Files

      Comment


      • #4
        With the latest version on ssc, this has now been fixed. Many thanks to Kit Baum for his assistance.

        Comment

        Working...
        X