Does DICTIONARY.COLUMNS even work for a libref using HADOOP engine?
Do you want to compare the DEFINED length of the variables? Or the maximum length of the actual values stored in the variable?
To just check the defined length you can use the metadata. You should also check if the variables are defined with consistent types (numeric or character).
proc sql ;
create table length_report as
select upcase(name) as NAME
, count(*) as n_datasets
, max(length) as max_length
, min(length) as min_length
, count(distinct length) as n_lengths
, min(type) as min_type
, max(type) as max_type
, count(distinct type) as n_types
from dictionary.columns
where libref='HADOOP'
group by 1
order by 1
;
To actually find the maximum observed length you will need to generate queries against each of the datasets.
... View more