Online File
Rick Aster: Professional SAS Programming Shortcuts: Contents
data _null_; compound = 'NaHCO3'; rem = compound; array el{16} $ 6; do i = 1 to dim(el) while (not missing(rem)); len = anyupper(rem, 2) - 1; if len <= 0 then len = length(rem); el{i} = substrn(rem, 1, len); rem = substrn(rem, len + 1); put el{i}; end; run;