combining Art ant Tom's methods:
data x;
input VAR0 $40.;
cards;
ABC_F_P_LOW
DEF_K__HIGH
ZPQ_M_X_MEDIUM
GKL_J_B
;
data want;
set x;
array v{4} $ ;
do _n_=1 to 4;
v{_n_}=scan(tranwrd(var0,'__','_ _'),_n_,'_');
end;
proc print;run;
obs VAR0 v1 v2 v3 v4
1 ABC_F_P_LOW ABC F P LOW
2 DEF_K__HIGH DEF K HIGH
3 ZPQ_M_X_MEDIUM ZPQ M X MEDIUM
4 GKL_J_B GKL J B
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.Register now and save with the early bird rate—just $795!
Register now
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.
Browse our catalog!