lib/syntax_file/controller.rb
def modify_metadata
    # Force all variables to be strings.
    if @all_vars_as_string
        @variables.each do |var|
            var.is_string_var    = true
            var.is_double_var = false
            var.implied_decimals = 0
        end
    end

    # If the user wants to rectangularize hierarchical data, the
    # select_vars_by_record_type option is required.
    @select_vars_by_record_type = true if @rectangularize

    # Remove any variables not belonging to the declared record types.
    if @select_vars_by_record_type
        rt_lookup = rec_type_lookup_hash()
        @variables = @variables.find_all { |var| var.is_common_var or rt_lookup[var.record_type] }
    end
end
def modify_metadata
    # Force all variables to be strings.
    if @all_vars_as_string
        @variables.each do |var|
            var.is_string_var    = true
            var.is_double_var = false
            var.implied_decimals = 0
        end
    end

    # If the user wants to rectangularize hierarchical data, the
    # select_vars_by_record_type option is required.
    @select_vars_by_record_type = true if @rectangularize

    # Remove any variables not belonging to the declared record types.
    if @select_vars_by_record_type
        rt_lookup = rec_type_lookup_hash()
        @variables = @variables.find_all { |var| var.is_common_var or rt_lookup[var.record_type] }
    end
end
Before generating syntax, we need to handle some controller-level
 options that require global modification of the metadata.