program def vallab
*! NJC 1.1.0 3 Dec 1997
    version 5.0
    local varlist "req ex max(1)"
    local if "opt"
    local in "opt"
    local options "Gen(str) SEP(str) SPaces(int 1)"
    parse "`*'"

    if "`gen'" == "" {
        di in r "gen( ) required"
        exit 198
    }
    else confirm new var `gen'

    tempvar label
    decode `varlist', gen(`label')

    local blanks : display _dup(`spaces') " "

    qui {
        gen str1 `gen' = ""
        replace `gen' = string(`varlist') + "`sep'" /*
         */ + "`blanks'" + `label' `if' `in'
        _crcslbl `gen' `varlist'
    }
end