🔍 SAS CompareX: A Developer-Friendly Tool to Visualize and Debug SAS Code with Clarity

💡 Why We Built SAS CompareX

As developers and analysts working in SAS environments, we’ve all hit the same wall:

“What changed in this SAS Code?”

Traditional diff tools — built for general-purpose languages — just don’t cut it when you’re dealing with SAS macros, nested DATA steps, temporary datasets, and multi-layered pipelines. I built SAS CompareX to solve exactly this.

It started as a side project to make sense of code diffs in my environment. Today, it’s evolved into a visual debugging companion that helps users compare, trace, and document changes in SAS scripts with intelligence and structure.

I built SAS CompareX to solve exactly this. But it’s not just a comparison tool — it’s also a companion for debugging, data lineage analysis, and deep inspection of SAS workflows.

🔗 Try the tool here:

https://sagar931.github.io/myBuilds/products/comparex.html


🚀 What Makes SAS CompareX Special?

✅ 1. Smart SAS Code Comparison

Not your typical diff. SAS CompareX tags lines as:

Article content
Horizontal Stacked

  • [ADDED], [REMOVED], or [MODIFIED]
  • Uses clear color-coded highlights
  • Preserves indentation and macro formatting

👉 Great for reviewing changes during handoffs or code audits.


🧬 2. Dataset Lineage Table

Trace how data moves across your SAS workflow.

SAS CompareX parses:

  • DATA and PROC SQL blocks
  • Input/output datasets
  • Macros, temporary vs permanent tables
  • Read vs Write operations
  • Displays line numbers and context

Article content
Dataset Lineage Table

📤 You can even export the lineage table to Excel or CSV.


🌐 3. Visual Dataset Lineage Graph

The most intuitive feature — a mind map of your data flow:

Article content
Quick Mind Map from Code

  • Nodes = datasets
  • Edges = SET, JOIN, FROM, etc.
  • Tooltips show line numbers and source context
  • SQL and DATA steps are color-coded
  • Includes Trace Mode — click a node to highlight all downstream datasets

Article content
Trace Mode

This is incredibly useful when debugging complex scripts or onboarding to unfamiliar projects.


💾 4. Save & Restore Sessions (.cxs Format)

Working with large scripts? You don’t need to repeat your setup.

I created a custom format:

🗂️ .cxs = CompareX Sync File

It stores:

  • File paths (Original & Updated)
  • Scroll positions
  • Highlight states
  • Theme and layout config

Article content
Custom cxs format

🎞️ 5. Auto-Scroll + Dark Mode + File Watcher

Some thoughtful touches:

  • 🌓 Dark Mode toggle for late-night debugging
  • 🌀 Auto-scroll for long comparisons (Slow, Medium, Fast)
  • 🔴 Change detection if a loaded file is modified externally
  • 🧠 Inline syntax formatting for better readability

Article content
Change Detection
Article content
Line Jump

📈 Use Cases

  • Debug Codes
  • Audit changes during releases
  • Understand inherited/legacy code
  • Train juniors on code structures
  • Build documentation from lineage outputs

Whether you’re a data engineer, analyst, or part of a QA team — CompareX adds structure to your SAS workflows.


🔧 Still Evolving

This is just the beginning.

I am actively improving SAS CompareX — adding features like:

  • Enhanced macro resolution
  • Cleaner export formats
  • Better UI polish for articles & documentation

Every update is shaped by real-world feedback from SAS users like you.


💬 Try It. Break It. Help Shape It.

🔗 Access it here:

👉 https://sagar931.github.io/myBuilds/products/comparex.html

If you’re a SAS user, developer, or data analyst — I’d love your feedback.

Feel free to share bugs, ideas, or simply explore the tool. Every click helps us make it better.


Made with ❤️ by Sagar Mandal

#SAS #SASCompareX #DevTools #CodeReview #DataLineage #DataEngineering #AnalyticsTools #MacroDebugging #SASTools #CompareX #VisualDiff #CodeAudits #WorkflowClarity



To view or add a comment, sign in

More articles by Sagar Mandal

Others also viewed

Explore content categories