Hi SAS users,
I have data coming like this in procedure code field - 1234|2345|4567 for a claim. I want to change make this to multiple lines by splitting the procedure codes pipes.
Original data :
clm procedure_code
1 1234|2345|4567
Needed format :
clm procedure_code
1 1234
1 2345
1 4567
Thanks,
Deepa
data have;
input clm procedure_code $30.;
datalines;
1 1234|2345|4567
;
data want;
set have;
do i = 1 to countw(procedure_code, '|');
p_code = scan(procedure_code, i, '|');
output;
end;
drop procedure_code i;
run;
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.