Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ado/repadolog.ado
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ qui {
local trkfile "`trkfolder'/stata.trk"
}


noi di as text _n "{pstd}Using {bf:stata.trk} file found at location {bf:`trkfolder'/}{p_end}"

************************
* Handle csv output options

Expand Down Expand Up @@ -149,7 +152,7 @@ qui {
if (substr(`"`macval(line)'"',1,2) == "e") {

* Distribution date is options, explicitly set N/A when missing
if missing("`distdate'") local distdate "N/A"
if missing("`distdate'") local distdate "No date in stata.trk"

local commands = trim(subinstr("`commands'",",","",1))

Expand Down
9 changes: 6 additions & 3 deletions src/ado/reprun.ado
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ end
local sub_f1 "`r(code_file_run1)'"
local sub_f2 "`r(code_file_run2)'"


* Substitute the original sub-dofile with the check/write ones
local run1_line = ///
subinstr(`"`line'"',`"`file'"',`""`sub_f1'""',1)
Expand Down Expand Up @@ -628,16 +629,17 @@ end
noi write_and_print_output, h_smcl(`h_smcl') ///
l1("`r(botline)'") l2(" ") ///
l3(`"{pstd} Stepping into sub-file:{p_end}"')

noi print_filetree_and_verbose_title, ///
files(`" "`orgfile'" "`new_orgfile'" "') h_smcl(`h_smcl') `verbose' `compact'
files(`" `orgfile' "`new_orgfile'" "') h_smcl(`h_smcl') `verbose' `compact'
output_writetitle , outputcolumns("`outputcolumns'")
noi write_and_print_output, h_smcl(`h_smcl') ///
l1("`r(topline)'") l2("`r(state_titles)'") ///
l3("`r(col_titles)'") l4("`r(midline)'")

* Make the recurisive call for next file
noi recurse_comp_lines , dirout("`dirout'") stub("`new_stub'") ///
orgfile(`"`orgfile' "`new_orgfile'" "') ///
orgfile(`" `orgfile' "`new_orgfile'" "') ///
outputcolumns("`outputcolumns'") h_smcl(`h_smcl') `verbose' `compact' `suppress'

* Step back into this data file after the recursive call and:
Expand All @@ -646,7 +648,7 @@ end
noi write_and_print_output, h_smcl(`h_smcl') ///
l1(`"{phang} Stepping back into file:{p_end}"')
noi print_filetree_and_verbose_title, ///
files(`" "`orgfile'" "') h_smcl(`h_smcl') `verbose' `compact'
files(`" `orgfile' "') h_smcl(`h_smcl') `verbose' `compact'
output_writetitle , outputcolumns("`outputcolumns'")
noi write_and_print_output, h_smcl(`h_smcl') ///
l1("`r(topline)'") l2("`r(state_titles)'") ///
Expand Down Expand Up @@ -965,6 +967,7 @@ end
program define print_filetree_and_verbose_title, rclass
syntax , files(string) h_smcl(string) [verbose] [compact]
local file_count = 0

foreach file of local files {
noi write_and_print_output, h_smcl(`h_smcl') ///
l1(`"{pstd}{c BLC}{hline `++file_count'}> `file'{p_end}"')
Expand Down