Hi Guys,
With the guides and helps from fellow members here, i now can have data from dictionary in dataset by using this code:
data want;
set sashelp.vcolumn (where=(libname="CDSSTG"));
run;
However, i want to remove the first 5 character from this column called memname and also remove the last character.
I did read up some guides for substr but if i want to apply it for the entire column in a dataset, may i know if i need to use loop?
Need your guide.
Like:
data want;
set sashelp.vcolumn (where=(libname="CDSSTG"));
memname=substr(memname,6,lengthn(tmp)-6);
run;
plz post it as text not picture, I don't want type it by hand.
And don't forget to post the output .
data _null_;
x='CSTG_XXXXX_ARERT';
y=prxchange('s/^[a-z]+_|[a-z]$//i',-1,strip(x));
put x= y=;
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 lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.