Announcement

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

  • Storing command in macro

    Hello,

    I have multiple (ado) programs named as clean_AP, clean_BI, clean_CH....etc. These are names of different programs written to clean data of different (Indian) states where AP, BI, CH etc. denote different states. I also have multiple sets of another ado programs for each state such as rename_AP, tehsil_AP, dists_AP....etc. which are to be used within corresponding clean_AP program.

    While writing clean_* programs, I want to store the program names in a local and extract state name from it to use it to call corresponding other programs. For example:

    When I run clean_AP program, I want to store "clean_AP" string in a local, say prgm, and store AP in another local, say state (using substr on prgm). Subsequently, I wish to use it to call other programs withing clean_AP by writing rename_"`state'", tehsil_"`state'"...etc.

    I really need to use state macro as I have hundreds of programs for each state; and this is to be repeated on multiple states every month. Can anybody suggest how to store the program name (clean_AP in my example) in a local called prgm?

    Hope I am clear.

    Thanks,
    Amit

  • #2
    You didn't get a quick answer. You will increase your chances of useful answer by following the FAQ on asking questions.

    It's not clear what your real problem is. Obviously, you can store program names in a local macro
    local pgmnames "clean_AP"

    You can also set up a macro with a bunch of program names in it, and loop over that.

    Comment

    Working...
    X