Hi,

I am trying to loop over subroutines but I am getting a break error before entering any of the subroutines. Can someone help me fix the code and understand why this is happening? Thanks.

Code:
foreach UNIVERSE in "LS&PCOMP" "LNASCOMP" "LS&P600I" "LDJCMP65" {

    *** O) Parameter definition ***
    capture program drop parameter_definition
    program parameter_definition

        global universe `UNIVERSE'
        display "$universe"

    end

    *** I) Data construction ***
    capture program drop data_construction
    program data_construction

        display "Construction Code"
        display "$universe"
        
    end

    *** II) Predictive model ***
    capture program drop predictive_model
    program predictive_model

        display "Predictive Model Code"
        display "$universe"

    end




parameter_definition
data_construction
predictive_model
}
Code:
. foreach UNIVERSE in "LS&PCOMP" "LNASCOMP" "LS&P600I" "LDJCMP65" {
  2. 
.         *** O) Parameter definition ***
.         capture program drop parameter_definition
  3.         program parameter_definition
  4. 
.                 global universe `UNIVERSE'
  5.                 display "$universe"
  6. 
.         end
--Break--
r(1);

end of do-file

--Break--
r(1);