data test;
infile cards truncover;
input (Bacode1-Bacode3) (: $40.);
cards;
atmbarcode:"FE235. atmbarcode:"Yu23
Atmbarcode:TU35. Row#% atmbarcode:WE45
;
run;
data have;
set test;
length x $ 32767;
x=catx(' ',of Bacode1-Bacode3);
n+1;
pid=prxparse('/atmbarcode:\W*\w+/i');
s=1;
e=length(x);
call prxnext(pid,s,e,x,p,l);
do while(p>0);
Bacode=substr(x,p,l);
output;
call prxnext(pid,s,e,x,p,l);
end;
keep n x Bacode ;
proc transpose data=have out=want(drop=_name_) prefix=Bacode;
by n x;
var Bacode;
run;
Your Error Log information ?
Post a TEXT/CSV file contains your TEST data.
Run PROC CONTENTS DATA=TEST;RUN; and post the result.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.