Quanticate Blog

How AI in SAS Programming Supports Clinical Workflows

Written by Clinical Programming Team | Fri, Jul 24, 2026

For clinical development teams, the value of AI in SAS programming lies in supporting routine activities while allowing programmers to focus on tasks that require statistical understanding, study knowledge, and regulatory judgement. Clinical trials depend on accurate, traceable, and compliant outputs, meaning AI adoption must be carefully managed within existing quality processes.

It is also important to distinguish between AI-assisted SAS programming and SAS as a company incorporating AI into its own technology platforms. AI-assisted SAS programming refers to programmers using generative AI tools to support their work, while SAS AI capabilities refer to AI features developed within SAS products, such as SAS Viya Copilot, which can assist users with code generation, explanations, and analytical workflows while maintaining human oversight. This article examines where these tools can help, their limitations in regulated clinical work, and how they may affect the SAS programmer’s role.

In Brief

  • AI in SAS programming means using generative AI to support programming work, which is distinct from AI features built into SAS products.
  • In clinical development, AI can reduce time spent on routine tasks while programmers retain responsibility for study-specific decisions.
  • Practical uses including finding documentation, interpreting standards, drafting routine code, reviewing programs, and investigating SAS log messages.
  • AI can produce plausible but incorrect outputs and may expose confidential information when tools and data handling are not properly controlled.
  • The main takeaway is to use AI as a reviewed starting point within approved processes, rather than as an independent programming or quality-control system.

 

Where can AI in SAS programming help most?

AI can provide the most value when it supports repetitive or information-heavy tasks rather than making study-critical decisions.

Accessing SAS documentation more efficiently

Finding the right information within technical documentation can take time, particularly when working with less frequently used procedures or unfamiliar functionality. AI tools can help programmers:

  • summarise documentation
  • explain SAS syntax and options
  • provide examples of common programming approaches
  • help interpret error messages

However, AI should be treated as a starting point rather than a replacement for approved documentation. Programmers still need to confirm that any guidance aligns with the relevant SAS version, organisational standards, and project requirements. Where possible, organisations can ground AI assistance in approved documentation rather than relying on unrestricted general-purpose responses. In a controlled retrieval-based system, responses can be limited to selected versions of SAS documentation, CDISC guidance, and approved internal material.

Supporting CDISC and programming standards

Clinical SAS programming relies on structured standards, including Clinical Data Interchange Standards Consortium (CDISC) models such as SDTM and ADaM. AI can support programmers by helping them:

  • understand terminology
  • interpret standard structures
  • locate relevant guidance
  • explain complex documentation

This can be particularly useful when navigating large volumes of technical material. However, final decisions about implementation should continue to follow approved specifications and organisational processes. The same principle applies to internal standard operating procedures, programming conventions and Good Programming Practice documentation. AI may help locate or explain approved guidance, but it should not replace the controlled source.

Drafting routine SAS code

Generating initial code is one of the most common areas where AI assistance is being explored.

AI can help create starting points for tasks such as:

  • DATA step development
  • PROC SQL queries
  • standard reporting code
  • macro templates
  • repetitive data manipulation tasks

For experienced programmers, this can reduce time spent on routine coding and allow more attention to be directed towards study-specific requirements.

Supporting code review and debugging

AI can also assist during programming reviews by helping identify potential issues, such as:

  • inconsistent naming
  • inefficient coding approaches
  • possible logic errors
  • areas where documentation could be improved
  • missing error handling or validation checks
  • departures from approved readability or programming conventions

It can also help explain SAS log messages or suggest possible causes of errors. These capabilities can support troubleshooting, but they do not replace formal quality control. Any suggested changes should still go through the organisation’s review, testing, and validation processes. Where an approved internal programming standard is available, AI-assisted review should be checked against that standard rather than treated as an independent quality assessment.

What are the limitations of AI in SAS programming and clinical data?

Although AI can improve efficiency, clinical programming presents challenges that require careful consideration. Unlike general software development, clinical trial programming involves sensitive information, protocol-specific decisions, and regulatory expectations.

Confidentiality and data protection

Protecting clinical trial information is one of the main considerations when introducing AI tools.

Public AI platforms may not be appropriate for handling confidential information such as:

  • patient-level data
  • statistical analysis plans
  • programming specifications
  • proprietary study documentation

Organisations should define clear policies around approved AI tools, data handling, and secure environments before incorporating AI into clinical workflows. These policies should cover SAS code and metadata as well as datasets. Before code is submitted to an approved tool, programmers may need to remove or mask sponsor names, protocol identifiers, file paths, headers, comments and other study-specific details.

Reviewing anonymised SAS logic may present a different risk profile from submitting the clinical data processed by that code. Approved private or contractually controlled systems may reduce some risks, but they still require defined access, retention and review controls.

Understanding study context

Writing valid SAS syntax is only one part of statistical programming. Programmers must understand the scientific and operational context behind each analysis. This includes:

  • study protocols
  • analysis populations
  • endpoint definitions
  • protocol amendments
  • sponsor-specific standards

AI can generate technically correct-looking code while missing important study-specific details. This is why programmer judgement remains essential when reviewing AI-generated outputs.

Accuracy of AI-generated outputs

Generative AI systems can sometimes provide inaccurate information or suggestions that appear convincing but are incorrect. In SAS programming, this may include:

  • unsupported syntax
  • incorrect procedure options
  • unsuitable programming approaches
  • inaccurate explanations

For this reason, AI output should be checked carefully before being incorporate into production workflows.

Maintaining accountability in regulated workflows

Clinical trial programming requires documented processes, validation, and accountability.

AI can support parts of the workflow, but responsibility for confirming analysis requirements, validating outputs, maintaining traceability, and approving deliverables remains with qualified professionals and the organisations responsible for regulatory submissions. Depending on organisational procedures, controlled use may also require retained review evidence, version management and clear documentation of where AI contributed to the work.

Can AI write SAS code?

AI can write SAS code, but it should be viewed as a starting point rather than a finished solution. Generative AI tools can help create code snippets, explain existing programs, and support debugging activities. For example, SAS Viya Copilot can assist with generating and explaining SAS code using natural language prompts.

The usefulness of AI-generated code depends largely on the complexity of the task. It is generally more effective for clearly defined, repetitive activities, such as creating templates or suggesting standard programming approaches.

The resulting code must still reflect the protocol, Statistical Analysis Plan (SAP), CDISC requirements and sponsor-specific standards. Programmers remain responsible for reviewing, testing and validating AI-assisted outputs before they enter a regulated workflow.

Will AI replace SAS programmers?

Concerns about AI replacing programming roles are understandable, but the impact is more likely to be a change in how SAS programmers work rather than the removal of the role.

Statistical programmers contribute far beyond writing code. They interpret study requirements, resolve data issues, apply programming standards, support validation activities, and work closely with statisticians and clinical teams.

How should SAS programmers respond to the influence of AI?

As the balance of the role changes, programmers will need to understand where AI can help and strengthen the skills needed to assess its output.

Build AI literacy

Understanding how AI tools work helps programmers use them effectively and recognise their limitations. Important areas include:

  • writing clear prompts
  • reviewing AI-generated outputs
  • understanding common AI errors
  • following organisational AI policies
  • challenging plausible-looking answers rather than accepting them at face value
  • recognising when the use of information would be inappropriate or outside approved policy

This knowledge helps programmers use AI more confidently while reducing the risk of relying on inaccurate suggestions. It also supports more ethical and proportionate use by helping programmers decide when AI should not be used.

Continue developing clinical expertise

Programming knowledge remains important, but broader clinical and statistical understanding will become increasingly valuable. Areas that continue to matter include:

  • CDISC standards
  • statistical methods
  • clinical trial processes
  • regulatory requirements
  • communication with study teams
  • code review, validation, and quality control

AI can assist with technical tasks, but it does not replace the experience needed to understand why a program is required and whether the result is appropriate. As initial code becomes easier to generate, the ability to test assumptions, identify missing study logic and explain why an output is valid becomes more important.

Conclusion

AI in SAS programming does not remove the need for experienced statistical programmers. Clinical knowledge, regulatory understanding, validation expertise, and professional judgement remain essential for producing reliable clinical trial outputs.

For organisations adopting AI, the focus should be on controlled implementation: using AI where it adds value while maintaining the quality, traceability, and oversight required in regulated clinical research.

FAQs

Can AI write SAS code?
Yes. AI can generate SAS code, explain programs, and support debugging. However, programmers must review and validate outputs before they are used in regulated clinical studies.

Is SAS using AI?
Yes. SAS has introduced AI capabilities, including SAS Viya Copilot, to support tasks such as code generation, explanations, and productivity improvements while keeping human oversight central.

What is the 30% rule for AI?
There is no official AI ‘30% rule’. Organisations should focus on risk-based governance and appropriate human review rather than relying on a fixed percentage.

Will AI replace SAS programmers?
AI is unlikely to replace SAS programmers. Instead, it is expected to automate selected tasks while increasing the importance of validation, clinical knowledge, and regulatory expertise.

How to face the impact of AI on SAS programmers’ careers?
Programmers should develop AI literacy, strengthen review skills, and continue building clinical and statistical expertise. AI should be used as a productivity tool alongside human judgement.

Quanticate’s clinical programming team helps sponsors assess where AI-assisted workflows can add value, while maintaining appropriate review, validation, traceability, and oversight. Request a consultation and a member of our team will be in touch.