1) I have a dataset A (having millions of records) in LASR library.
2) Importing B file with few hundred rows.
3) Need to compare A and B and delete common records from A (lasr library) without creating a temporary copy.
Solution:
Using imstat statement--(not working)
proc imstat data=LASRLIB.A;
merge LASRLIB.A (in=a)
B (in=b);
if a and b;
run;
deleterows / purge;
run;
(Note: Merge not working with proc imstat.)
Is there any other way to do it?
Got the solution!
Storing all unique values in macro variable and passing in where clause of proc imstat.
proc imstat = lasrlib.A;
where column = ¯o;
run;
deleterows / purge;
run;
Got the solution!
Storing all unique values in macro variable and passing in where clause of proc imstat.
proc imstat = lasrlib.A;
where column = ¯o;
run;
deleterows / purge;
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.