Help using Base SAS procedures

Comparing two libraries

Reply
Frequent Contributor
Posts: 145

Comparing two libraries

I have two libraries(A and B) with similar kind of data sets (Datasets name is same in both libraries. EXAMPLE: AE ) and same structure with one common variable of ID in all datasets. I want to write a generalized macro which would compare same datasets name in two libraries(AE in both libraries A and B) and will pull out those ID which are present in A.ae but not in B.ae and vice versa.


Thanks

Valued Guide
Posts: 3,208

Re: Comparing two libraries

proc compare?

---->-- ja karman --<-----
Super User
Posts: 5,083

Re: Comparing two libraries

If you show us how you would compare A.ae to B.ae, there are many posters here who can show you how to turn that into a macro to (1) find a list of all common data sets in the libraries, and (2) compare each pair.  But if you don't know how to make the comparison for a single data set, well, you have to be able to do that before you can consider writing a macro.

Ask a Question
Discussion stats
  • 2 replies
  • 271 views
  • 0 likes
  • 3 in conversation