*! 2.0.1 (Jan 03, 1997) Jeroen Weesie/ICS STB-35 dm43 *! 1.0.0 (May 26, 1990) Albert Verbeek & Jeroen Weesie/ICS program define repl version 5.0 local varlist "req ex max(1)" local exp "req nopre" local if "opt" local in "opt" local options "by(string) Label(str) Oldlabel noDef" parse "`*'" * by clause if "`by'" != "" { unabbrev `by', min(1) local by "$S_1" local sorder : sortedby * only change sort-oder if required if "`sorder'" == "" | index("#`sorder'","#`by'") == 0 { sort `by' } local By "by `by': " } * evaluate expression quietly `By' replace `varlist' = `exp' `if' `in' * define char Defntion if "`def'" == "" { char define `varlist'[Defntion] "`By'`exp' `if' `in'" } * define variable label if "`oldlabe'" == "" { if "`label'" == "" { local label "`exp' `if' `in'" if length("`label'") > 31 { local label = substr("`exp'",1,28) + "..." } } else if "`label'" == "_" { local label } label var `varlist' "`label'" } end exit