Announcement

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

  • Recursively defining addresses ins Stata Programs

    Hello all.

    I have been writing a series of programs to clean up some data for myself. Now what I would like to do is set up a master do file that will execute all of the other programs - however, I'd like it to be useful to anyone in my department.

    What I currently have in each program looks like this:

    capture program drop MASTERFILE
    program define MASTERFILE
    version 1.0
    syntax , IADR(string) MADR(string) PADR(string) TADR(string)
    ....
    ....
    end
    MASTERFILE, iadr(".....") ///
    madr("......l") ///
    padr(".....") ///
    tadr(".....")

    ____________
    Each program contains the same list of addresses. What I would like to be able to do is to set those addresses only in the master file, and then have the changes carried through all of the subprograms that the master file calls.

    This should be simple, but for the life of me I cannot remember how to do this.

    Thanks!



  • #2
    What do you mean with adresses? Just a string?
    If so you can define a list of local in the beginning of the masterfile and refer to the locals throughout the rest of your do files?

    Comment


    • #3
      There is a standard way to pass information to called programs - look at the ado documentation.

      Comment

      Working...
      X