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 (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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