Skip to main content
v2026.11,986 entries · CC-BY 4.0

SAS Viya Platform: What It Is, How to Access It and a First CAS Workflow

What SAS Viya is, how researchers get access, and how a first CAS session, caslib and table workflow works.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

SAS Viya is SAS’s unified data and AI platform: one environment for data management, analytics, model building, governance and deployment, available in the cloud, in hybrid setups or on premises. For a researcher, the practical core is the Cloud Analytic Services (CAS) server, an in-memory engine you reach through a named session, work with through caslibs and in-memory tables, and in which you submit SAS, Python, R, Lua or Java requests. This guide explains what the platform is, how researchers reach it and how a first CAS session, caslib and table workflow fits together, using SAS’s own documentation (version 2021.1.6 – 2026.06 of the CAS fundamentals).

What SAS Viya is used for in research

SAS describes Viya as a platform that unifies data, analytics and governance, so that teams can deliver transparent, trustworthy insights at scale. The components SAS names on its Viya page are data management, an Explore and Model area (data mining, machine learning and statistical modeling, with both visual and code interfaces), deployment of insights, AI governance, the SAS Viya Copilot and an MCP server. SAS also states that Viya supports Python, R, Java, Lua and REST APIs.

For research groups the relevant uses are the ones that sit behind those names: preparing and joining analysis datasets, running statistical and machine-learning procedures on tables held in memory, and keeping a documented, repeatable program rather than a sequence of menu clicks. If you already know SAS from desktop or server installations, the SAS statistical software guide covers the language and procedures at a higher level, and coding in SAS covers program structure. What changes in Viya is where the data lives while you analyse it and how you start a session.

The 2026.06 rename researchers will notice

The CAS fundamentals documentation states that “SAS Data and AI Studio (known as SAS Studio prior to 2026.06) provides a programming environment for developing and submitting SAS programs to the server.” Tutorials, course notes and lab handouts written before that release call the same programming interface SAS Studio, so a menu name or product name in an older handout may not match what you see now. When a protocol document says “open SAS Studio”, on a 2026.06 or later deployment that means SAS Data and AI Studio.

How to install or access SAS Viya

Viya is not a desktop installer that an individual researcher downloads and runs on a laptop. SAS documents CAS as the server for on-premises Kubernetes and cloud deployments, and SAS’s Viya page lists cloud, hybrid and on-premises deployment, naming AWS, Azure, Google Cloud or on-premises as the options. In practice a researcher gets access in one of two ways: through an administrator at their institution or organisation who has deployed it, or through an offer from SAS itself. SAS’s Viya page states that a 14-day free trial is available; this guide gives no pricing because SAS licensing is set by SAS and your institution.

Authentication uses the provider configured at deployment. The CAS documentation lists SAS Data and AI Studio, batch jobs and SAS Drive as places where you authenticate. For learner and teaching routes to SAS software, see SAS Academic; for the older desktop-style client, see SAS Enterprise Guide.

What your administrator controls

Several things you will rely on are set up by administrators rather than by you. Predefined caslibs are created at deployment by an administrator. In a new deployment only administrators add or delete global caslibs. Resource limits also belong to the deployment: the documentation gives a default limit of 5,000 concurrent sessions. Knowing which of these are administrator decisions saves time when something is unavailable to you.

Step-by-step: your first CAS session, caslib and table

The CAS fundamentals documentation describes the workflow below. It gives statement names; check the exact options for your release in the documentation before running anything on production data.

  1. Sign in. Log on to SAS Data and AI Studio (or another authenticated client). The server authenticates you using the provider configured at deployment.
  2. Create a session with the CAS statement. The documentation says that when you log on to SAS Data and AI Studio you must use the CAS statement to create a session. The server starts a session controller process for you. Your session is identified by a name and a UUID.
  3. Check which caslib is active. The documentation names the CASLIB statement with _ALL_ LIST as the way to list caslibs and see the active one. Your personal caslib, CASUSER(user-ID), is always available and is active at the start of a session; its default path is /cas/data/casuserlibraries/user-ID.
  4. See what can be loaded. The LIST FILES statement of PROC CASUTIL shows files that can be loaded from a caslib’s data source into memory.
  5. Load data into memory. CAS operates only on in-memory tables. A client-side load (a DATA step with the CAS LIBNAME engine, or PROC CASUTIL with LOAD DATA=) sends data serially from your client through the session controller, which distributes it round-robin to the workers. A server-side load (PROC CASUTIL with LOAD CASDATA=) reads a file the server can already see. For large files, the documentation warns that client-side loading is slow.
  6. Analyse. Submit SAS programs, or call CAS from Python, R or Lua through SWAT (SAS Scripting Wrapper for Analytics Transfer). The session executes requests serially.
  7. Save what you need to keep. The documentation advises: after the data is in memory, save it to a caslib’s data source. In-memory tables are not a substitute for stored files.
  8. Clean up. Dropping an in-memory table does not remove a file that was persisted from it. Ending the session ends session-scope tables and caslibs.

Caslibs: where tables live

The documentation defines a caslib as an in-memory space that holds tables, access control lists and data source information; all data is available to CAS through caslibs. Caslib names must be unique, and a session-scope caslib hides a global caslib that has the same name. The data table below compares caslib types and table scopes as the documentation describes them.

Output and how to read it

Most results you will read are ordinary SAS output from the procedures you run, so interpret them as you would any SAS result. The CAS-specific diagnostics are about resources. The METRICS= option, off by default, shows real time, CPU time and memory for each request, which helps you tell whether a slow program is slow because of the analysis or because of a client-side load. Because a session executes requests serially, a long request delays the next one in the same session.

Why a table can be missing

The most common surprise is scope. The documentation describes three table scopes. A session-scope table is the default; it is dropped when the session ends and is recommended for general programming. A global-scope table is long-lived and available to all sessions subject to access controls; it cannot be replaced, so you must drop it and reload it, and you promote a table to global with PROC CASUTIL or the DATA step. A transient table exists only for the duration of an action and applies to action programming, not to the CAS LIBNAME engine. Resources such as caslibs, librefs, tables and formats are visible only to your own session by default, so a colleague will not see a session-scope table you created.

Troubleshooting

  • The table is gone the next day. It was probably session scope and was dropped when the session ended. Save the table to a caslib’s data source, or promote it to global scope if your access controls allow.
  • You cannot replace a table. Global-scope tables cannot be replaced. Drop the table and load it again.
  • A table you dropped is still on disk. Dropping an in-memory table does not remove the persisted file. Deleting the file is a separate action.
  • You cannot add a global caslib. In a new deployment only administrators add or delete them. Ask for one, or create a session-scope caslib for your own work.
  • The wrong data appears under a caslib name. A session-scope caslib hides a global caslib with the same name. Check with CASLIB _ALL_ LIST.
  • A dropped connection. An orphaned session is terminated automatically after a time-out; the default is 60 seconds and can be changed with the TIMEOUT= option. Reconnecting starts new work, so anything held only in session scope is lost.
  • A server fault on a single-machine deployment. A fault of the controller clears all in-memory data and session-scope caslibs, which is another reason to save to a data source.

Data handling and reproducibility

CAS’s scope rules are useful for research data practice. The documentation lists table, column and row-level authorization, encryption at rest for SASHDAT files (with a password per file or per caslib) and TLS for data in motion by default. A reproducible analysis in Viya keeps the program that loads, transforms and saves the data, uses persisted sources rather than in-memory tables as the record, and states the platform release in the methods note, since interface names changed in 2026.06. For planning data stewardship around such a workflow, see the CASRAI R vs SAS comparison and the SAS University Edition guide for the older learning route.

Free alternatives

If your institution does not have Viya, the same kinds of analyses can be done in open-source tools. The R Project describes R as a free software environment for statistical computing and graphics that compiles and runs on a wide variety of UNIX platforms, Windows and macOS. The Python Software Foundation states that Python is developed under an OSI-approved open source license, making it freely usable and distributable. SAS’s own SWAT package also lets Python, R and Lua run analyses on a CAS server, so these languages can be used with Viya as well as in place of it.

Option What the source says Source
R Free software environment for statistical computing and graphics; runs on UNIX platforms, Windows and macOS. The R Project
Python Developed under an OSI-approved open source license; freely usable and distributable. Python Software Foundation
SWAT with CAS Lets Python, Lua and R run analyses on the CAS server; requires access to a Viya deployment. SAS CAS fundamentals documentation

The R versus SAS comparison sets the two languages side by side for researchers choosing between them.

Frequently asked questions

How do I keep a table after my CAS session ends?

Session-scope tables are the default and are dropped when the session ends. The documentation advises saving the table to a caslib’s data source after it is in memory, or promoting it to global scope if your access controls allow. Dropping an in-memory table does not remove a file persisted from it.

Who can add a global caslib?

In a new deployment only administrators add or delete global caslibs. Predefined caslibs are created at deployment by an administrator. If you need one, ask your administrator, or create a session-scope caslib for your own work.

What does the SAS Studio rename mean?

The CAS fundamentals documentation says SAS Data and AI Studio was known as SAS Studio prior to 2026.06. On a 2026.06 or later deployment, an older handout that says “open SAS Studio” refers to SAS Data and AI Studio.

What happens if my connection drops?

An orphaned session is terminated automatically after a time-out, and reconnecting starts new work, so anything held only in session scope is lost. Save what you need to a data source.

Sources

Data: CAS caslib types and table scopes compared

Compares the caslib types and table scopes of SAS Cloud Analytic Services as described in the SAS CAS fundamentals documentation (2021.1.6 - 2026.06): where each lives, how long it lasts, who can add it and what to remember when using it. Compiled from the vendor's primary documentation.

Period covered: 2021.1.6 - 2026.06.

CAS caslib types and table scopes compared
ItemKindLifetime or availabilityKey rule from the documentation
Session-scope tableTable scopeDropped when the session endsDefault scope; suited to general programming
Global-scope tableTable scopeLong-lived; available to all sessions subject to access controlsCannot be replaced; drop and reload; promote with PROC CASUTIL or the DATA step
Transient tableTable scopeOnly for the duration of an actionAction programming only; not available through the CAS LIBNAME engine
Personal caslib CASUSER(user-ID)CaslibAlways available; active at session startDefault path /cas/data/casuserlibraries/user-ID
Predefined caslibCaslibCreated at deploymentCreated by an administrator
Session-scope caslibCaslibAdded with the CASLIB statement; session scope by defaultHides a global caslib with the same name
Global caslibCaslibAvailable beyond one sessionIn a new deployment only administrators add or delete them

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about SAS Viya Platform: What It Is, How to Access It and a First CAS Workflow

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →