Introducing SAS Compute Server Enhancements
- Article History
- RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Edoardo has already covered the architectural aspects of the recent enhancements of SAS Compute Server, available in SAS Viya starting with the stable 2025.02 release. He also detailed its origins in the Multi-Language Architecture used in SAS Viya Workbench. Now, let's explore what it means for users.
Run CAS Actions on Traditional SAS Libraries
Many tasks that were previously exclusive to CAS as CAS actions are now available in SAS Compute Server as SAS procedures. This means you can execute these procedures directly on data accessible from traditional SAS libraries.
Example with an existing CAS-enabled procedure MDSUMMARY:
80 proc mdsummary data=sashelp.cars ;
81 var MSRP MPG_City ;
82 output out=mdsumstat ;
83 run ;
NOTE: SAS Viya processed the request in 0.004806 seconds.
NOTE: The data set WORK.MDSUMSTAT has 2 observations and 17 variables.
NOTE: PROCEDURE MDSUMMARY used (Total process time):
real time 0.12 seconds
cpu time 0.12 seconds
This code would have resulted in an error in previous versions of SAS Viya:
80 proc mdsummary data=sashelp.cars ;
81 var MSRP MPG_City ;
82 output out=mdsumstat ;
83 run ;
ERROR: The data set SASHELP.CARS must use a CAS engine libref.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.MDSUMSTAT may be incomplete. When this step was stopped there were 0 observations and 0 variables.
NOTE: PROCEDURE MDSUMMARY used (Total process time):
real time 0.05 seconds
cpu time 0.02 seconds
No Need to Load Data into CAS for CAS-Only Features
Let's look at this from a different perspective. If you have a SAS data set or an Oracle table (or any type of data) available in your SAS Compute Server environment, you can now run a CAS-enabled procedure on it directly. There's no need to establish a connection to CAS, load the data into CAS, and then run the procedure. You can execute the procedure directly on your SAS library data.
Behind the scenes, data is seamlessly streamed into memory on the SAS Compute Server, ensuring transparency for the user. This process introduces some architectural considerations when utilizing these new capabilities (refer to Edoardo's post for more details). Additionally, it's important to note that these procedures do not run in-database when executed on database data.
Example with a CAS-enabled procedure run on an Oracle table (sasora is an Oracle engine library defined in SAS Compute Server, not a CAS engine library):
80 proc freqtab data=sasora.client_addresses ;
81 tables state * city /
82 crosslist chisq measures(cl) ;
83 run ;
NOTE: SAS Viya processed the request in 0.010654 seconds.
NOTE: The PROCEDURE FREQTAB printed pages 3-8.
NOTE: PROCEDURE FREQTAB used (Total process time):
real time 0.25 seconds
cpu time 0.22 seconds
If you wanted to use the same procedure in previous versions of SAS Viya, you would need to use CAS and run this code:
cas mysession ;
proc casutil incaslib="casora" outcaslib="casora" ;
load casdata="CLIENT_ADDRESSES" casout="CLIENT_ADDRESSES" ;
quit ;
proc freqtab data=casora.client_addresses ;
tables state * city /
crosslist chisq measures(cl) ;
run ;
New Algorithms in SAS Compute Server
Over the past decade, many innovative analytics algorithms and methods have been introduced in CAS. Now, you can easily leverage these advancements in SAS Compute Server. This is made possible by the enhanced compute environment, which offers the same benefits as SAS Viya Workbench: the ability to use CAS actions without needing data to be loaded in a CAS server.
Example with a relatively new CAS-enabled procedure:
80 proc superlearner data=sasora.dataForTrain seed=2324;
81 target y / level=interval;
82 input z1 z2 / level=nominal;
83 input x1-x5 / level=interval;
84 baselearner 'lm' regselect;
85 baselearner 'lasso_2way' regselect(selection=elasticnet(lambda=5 mixing=1))
86 class=(z1 z2) effect=(z1|z2|x1|x2|x3|x4|x5 @2);
87 baselearner 'gam' gammod class=(z1 z2) param(z1 z2 x1 x2)
88 spline(x3) spline(x4) spline(x5);
89 baselearner 'bart' bart(nTree=10 nMC=100);
90 baselearner 'forest' forest;
91 baselearner 'svm' svmachine;
92 baselearner 'factmac' factmac(nfactors=4 learnstep=0.15);
93 store out=slmodel;
94 run;
NOTE: The output analytic store WORK.SLMODEL is simply a reference to the analytic store SLMODEL that is in memory. To save the
in-memory store on disk, use the DOWNLOAD statement in the ASTORE procedure.
NOTE: 5601805 bytes were written to the table "SLMODEL".
NOTE: SAS Viya processed the request in 14.953118 seconds.
NOTE: The data set WORK.SLMODEL has 1 observations and 2 variables.
NOTE: The PROCEDURE SUPERLEARNER printed page 15.
NOTE: PROCEDURE SUPERLEARNER used (Total process time):
real time 15.02 seconds
cpu time 23.87 seconds
Multi-Threaded Algorithms in SAS Compute Server
Not only do you have access to the latest and most advanced features available in CAS, but you also benefit from natively designed multi-threaded operations in SAS Compute Server.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
No Need for PROC CAS or CASL
In the recent past, many CAS actions were available without equivalent CAS-enabled procedures. This meant you had to explicitly call the CAS action using PROC CAS in a SAS Compute Server. Sometimes, you also needed to encapsulate the CAS action call in CASL for better control and advanced logic.
With the integration of CAS actions into SAS Viya Workbench and SAS Viya Compute servers, you no longer need to use PROC CAS or CASL to run these actions. Instead, you can utilize the simpler SAS procedure syntax.
Seamlessly Integrated
You don't need to set up, learn, or migrate to an additional Compute server. It's available right out of the box. You'll use it seamlessly without even realizing it. The Compute environment in Stable 2025.02 natively includes these enhanced capabilities. Simply open SAS Studio, wait for your Compute context to start, and you're ready to go.
Parity Between SAS Viya Workbench and SAS Viya
Now, developers using SAS Viya Workbench and SAS Viya users can coexist seamlessly. Code developed in SAS Viya Workbench will run smoothly in SAS Viya.
This setup allows customers with highly regulated production environments to build an analytics infrastructure where data scientists can experiment in a flexible, on-demand, secure, and isolated environment (SAS Viya Workbench). Meanwhile, SAS administrators can maintain the integrity of their sensitive SAS Viya production environments, protecting them from development activities and ad-hoc workloads. Once code or applications are ready in SAS Viya Workbench, they can be moved to production in SAS Viya, adhering to established controls.
Multi-Language Architecture (MLA)
In the new SAS Viya enhanced compute environment, just like in SAS Viya Workbench, you get native programming support for third-party languages such as Python, with R support coming soon. With the sasviya.ml package, Python developers can leverage SAS's trusted analytics using a native Python syntax similar to scikit-learn.
SAS 9 Users Gain CAS Advanced Analytics Without Using CAS
Until the Stable 2025.02 release, to fully leverage SAS Viya, you needed to use CAS, which involved sizing it properly, planning data loading/unloading, administering it, and using specific CAS actions and CASL syntax.
Now, when transitioning to SAS Viya, SAS 9 users can quickly access new capabilities through a variety of new SAS procedures while maintaining their traditional client/server usage habits, without needing to learn CAS first.
CAS Still Matters!
Don't get me wrong, CAS still makes a significant impact! When dealing with scenarios that involve handling massive amounts of data or accommodating a large number of users, CAS and its MPP architecture are essential for achieving unparalleled performance.
Thanks for reading!
Find more articles from SAS Global Enablement and Learning here.