Help using Base SAS procedures

PROC COMPARE Question

Reply
Super Contributor
Posts: 358

PROC COMPARE Question

Hi All:

Quick question -

I have 2 SAS tables that have a lot of variables in them (200+) .  I expect that all variables except 1 are the

same (a datetime value).

Is there a way to run PROC COMPARE on all variables except 1 (like using a EXCLUDE=varname) ?

would rather not use a data step with a "DROP=" if it can be helped.  Also these tables a large so I need

to keep that in mind.

Thanks in advance.

Super User
Super User
Posts: 7,050

Re: PROC COMPARE Question

No. You can use the data set option DROP so it will not require a DATA step.

proc compare data=one(drop=ignore_me)  compare=two;

run;

Super Contributor
Posts: 358

Re: PROC COMPARE Question

Answered my own question...

use (DROP=variable) on each or the tables in the compare.

I didn't know the DROP= could be user there.....

Trusted Advisor
Posts: 3,214

Re: PROC COMPARE Question

It has a been a long time ago using that.
Does the datasetoptions (like where) not work and than coding the drop there?. SAS(R) 9.4 Data Set Options: Reference

(did have diner before finishing the message)

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 3 replies
  • 225 views
  • 4 likes
  • 3 in conversation