Hi,

I have a large piece of code that I would like to break down in several smaller pieces of code that I could run (or not) from the top of the .do file. I do not want to break down the main do file in several do files but rather have more control over the part of the code I am running in 1 single do file.

* Main file:
** Call 1st piece of the code: 1) Merging data
***** Some code that calls the 1st part "merging data"

** Call 2nd piece of the code: 2) regression analysis
***** Some code that calls "regression analysis
etc.


I have tried the following but I do not get any display. Anyone can point to the right direction/format?Thanks!

Code:
clear
capture program drop main
program main
    test
end

capture program drop test
program test
    di "Hello World"
end