Hello! So I need to create a list using proc sql because I am running a statistical test that runs a bunch of tests cross referencing the variables called for in the variable list.
My proc sql code is:
proc sql noprint;
select name into :tier1snps separated by ' '
from dictionary.columns
where libname=upcase("work") and memname=upcase("domsnp")
and (substr(name, 1, 3) in ('dom') or substr(name,1) in ('DOM_RS10462018','DOM_RS7107287','DOM_RS11022778','DOM_RS969485'));
quit;
The list I get when I do %put &tier1snps is:
DOM_RS10462018 dom_rs12915776 dom_rs8041466 dom_rs4775351 dom_rs34720147
dom_rs2305159 DOM_RS7107287 dom_rs1801260 dom_rs1982350 DOM_RS969485
dom_rs2414680 dom_rs11071557 dom_rs809736 dom_rs782931 dom_rs4774388
DOM_RS11022778 dom_rs13329238 dom_rs12906588 dom_rs738499 dom_rs5758324
dom_rs8023563
dom_rs16943472 dom_rs2267150
I want to get rid of the last entry "dom_rs2267150" but I cannot figure out how to manually drop entries, although I figured out how to manually add entries. This would be a great help! Thank yo uso much!
Add another condition to your query:
And name not in (exclusion list);
Add another condition to your query:
And name not in (exclusion list);
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.