Hi,
I compared two data sets, want to keep the compared data in one table.
can anyone help me how to display compared data in tabular format in SAS EG.
Thanks in Advance.
From the manual:
specify out=
and give a dataset name to store the output.
Please post the SAS code that you are having problems with. Also include you SAS log.
Lots of SAS code and examples are available online, but you should show your attempts at resolving the problem first so that the experts can help guide.
If you are not getting much of a response to your question, it's probably because you left out most of the important information. Here's what you should describe, and not leave to our imagination.
"I compared two data sets"
"want to keep the compared data"
"in one table"
"display the compared data"
Thanks for the response,
how to print proc compare results as table or html.
the below data have display in html or table format:
Variables Summary
Number of Variables in Common: 3.
Observation Summary
Observation Base Compare
First Obs 1 1
Last Obs 4 4
Number of Observations in Common: 4.
Total Number of Observations Read from
WORK.DEMOG: 4.
Total Number of Observations Read from
WORK.COMPARE: 4.
Number of Observations with Some Compared Variables
Unequal: 0.
Number of Observations with All Compared Variables
Equal: 4.
NOTE: No unequal values were found. All values
compared are exactly equal.
Thanks
The most flexible way would add this statement before running PROC COMPARE:
ods trace on;
Then you can see notes in the log about all the pieces of output that ODS stores. You can capture the ones you want as SAS data sets using multiple ODS OUTPUT statements.
Each piece can then be printed using a simple PROC PRINT. You can add as much formatting as you would like, when it comes time to print.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.