sas-migration

Migrate SAS programs to Python, Java, or Postgres with operational fidelity verification.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/pjherron/hypoc --skill sas-migration-pjherron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sas-migration
Source: https://github.com/pjherron/hypoc/tree/main/hypoc/skills/sas-migration
Command: npx skills add https://github.com/pjherron/hypoc --skill sas-migration-pjherron

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Legacy SAS programs in pharma QC environments must be modernized without losing the audit checkpoints and conclusionary reports that regulators and managers depend on, and manual rewrites risk silent behavioral divergence. ## Core Features & Use Cases - Structured Migration Workflow: Inventory DATA steps, PROC steps, macros, and library references, then map each to Python (pandas/polars), Java, or Postgres equivalents with documented divergence notes. - Audit Checkpoint Preservation: Every SAS checkpoint gets a named equivalent in the migrated code, with a checkpoint map linking SAS names to extraction methods. - Fidelity Verification & Effort Tracking: Run both versions on identical inputs, compare conclusionary reports, and log hours per phase to calibrate cost estimates for remaining programs. - Use Case: A pharma team piloting migration of 3 SAS programs uses this workflow to produce migrated code, fidelity notes, and effort logs that feed cost re-estimation for 33 remaining programs. ## Quick Start Start a SAS migration session by asking the assistant to inventory a SAS program and map its DATA steps and checkpoints to a Python equivalent.

Frequently Asked Questions about sas-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate SAS programs to Python?▼

Inventory all DATA steps, PROC steps, macros, and library references, then map DATA steps to pandas or polars, PROC SQL to Postgres or SQLAlchemy, and macros to Python functions. Document every point where Python behavior diverges from SAS as a fidelity risk.

What is operational fidelity in SAS migration?▼

Operational fidelity means the migrated system does the same job in production: reports are correct and QC checkpoints are trustworthy. It is the acceptance criterion rather than byte-for-byte output parity with the original SAS program.

How do I preserve SAS audit checkpoints in migrated code?▼

Each checkpoint in the SAS program must have a named equivalent in the migrated code, extractable at the same logical pipeline point. Document the mapping as SAS checkpoint name to migrated equivalent to extraction method.

Can SAS PROC SQL be converted to Postgres?▼

Yes, PROC SQL maps to Postgres queries or SQLAlchemy in Python. SAS formats and informats need Python equivalents with notes on divergence, since missing value handling, sorting defaults, and date formats can differ.

How is migration effort tracked for cost estimation?▼

Log hours per phase: inventory, mapping, implementation, and verification. Record complexity signals like macro count, external library dependencies, checkpoint count, and data volume to feed the cost re-estimation model for remaining programs.