Hello ALL,
I have data like in below format in one column.
/home
/home/warehouse
/home/warehouse/sasirm
/home/warehouse/sasirm/pa
/home/warehouse/sasirm/report
/sso/transport
I want to output as
home
warehouse
sasirm
pa
report
transport
Please provide me one liner combo function which can manipulate data.
data have; input str $80.; want=scan(str,-1,'/'); cards; /home /home/warehouse /home/warehouse/sasirm /home/warehouse/sasirm/pa /home/warehouse/sasirm/report /sso/transport ;
data have; input str $80.; want=scan(str,-1,'/'); cards; /home /home/warehouse /home/warehouse/sasirm /home/warehouse/sasirm/pa /home/warehouse/sasirm/report /sso/transport ;
Thank you, its working.
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.