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 (rem ne ''); ellen = indexc(substr(rem, 2), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'); if ellen = 0 then ellen = length(rem); el{i} = substr(rem, 1, ellen); rem = substr(rem, ellen + 1); put el{i}; end; run;