Open thomas-rasmussen opened 1 year ago
The following SQL step using count() to find the number of rows in datasets is inefficient. https://github.com/thomas-rasmussen/sas_macros/blob/946b8b376f62ed4a8b3583dccb58a960a808c3b1/hash_match.sas#L817-L825 Replace with an approach that pulls the information from metadata.
Look at other code or maybe https://www.listendata.com/2017/04/number-of-observations-in-sas-data.html for inspiration
Maybe something like
%local ds_id rc n_rows; %let ds_id = %sysfunc(open(data)); %let n_rows %sysfunc(attrn(&ds_id, nobs)); %let rc = %sysfunc(close(&ds_id));
The following SQL step using count() to find the number of rows in datasets is inefficient. https://github.com/thomas-rasmussen/sas_macros/blob/946b8b376f62ed4a8b3583dccb58a960a808c3b1/hash_match.sas#L817-L825 Replace with an approach that pulls the information from metadata.
Look at other code or maybe https://www.listendata.com/2017/04/number-of-observations-in-sas-data.html for inspiration