BookmarkSubscribeRSS Feed
gyambqt
Obsidian | Level 7

For example I have two log files: A and B

A has

a

b

c

 

B has

c

b

c

 

So I want to compare the two files line by line and put the difference in another table such as

 

tablename=Compare_result

line_no      records_from_a   records_from_b   

1                          a                      c                

6 REPLIES 6
Patrick
Opal | Level 21

SAS logs are unstructured text and will differ between executions starting with the execution date. Any small change in logging options will cause changes to the SAS log and especially on which line log messages appear. 

 

I suggest you take a more targeted approach for what you want to collect and let us know. 

 

Below links should be of interest for you.

Track Performance in SAS with the LOGPARSE Macro

SAS® 9.4 Logging: Configuration and Programming Reference, Second Edition

SCAPROC Procedure

SAS® 9.4 Interface to Application Response Measurement (ARM): Reference

 

Ksharp
Super User
Using the third side software, like : WinMerge
Quentin
Super User
Looks for any utility that does comparison of text files. Notepad++, UltraEdit, DIFF, I'm a big fan of BeyondCompare.
The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
Patrick
Opal | Level 21

@Quentin wrote:
Looks for any utility that does comparison of text files. Notepad++, UltraEdit, DIFF, I'm a big fan of BeyondCompare.

Me too! I'm a long time BeyondCompare user and never seen a "better" utility for text comparison that's so rich in functionality yet so intuitive to use.

SASKiwi
PROC Star

For what purpose do you want to compare log files?

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1171 views
  • 0 likes
  • 5 in conversation