Modernizing from SAS 9.4 to Viya with SAS Managed Cloud Services
Recent Library Articles
Modernizing from SAS 9.4 to Viya takes more than a cloud move—it requires a new operating model. This article explains why lift-and-shift falls short and how SAS Managed Cloud Services helps organizations modernize faster, reduce complexity, and improve outcomes.
SAS Forward: Real Stories, Live Demos and AI Innovation
Ask the Expert
Join us November 4-5 for SAS Forward, a virtual event exploring modern analytics, AI and intelligent decisioning. Discover real-world success stories, explore emerging trends, and see the latest SAS innovations in action through expert-led sessions and live demonstrations.
Hello SAS Community, My name is Yosia Hadisusanto. I live in Hannover, Germany, and work as a freelance statistical programmer for the pharmaceutical industry. For my daily work I wanted a SAS editor where I can debug DATA steps and macros, customize it to the way I work, and search and filter a data set easily. So I built one: DataStep Studio, a VS Code extension for SAS programming. It works with SAS OnDemand for Academics and is built for SAS 9.4 servers as well (IOM, the connection SAS Enterprise Guide uses). I only have access to SAS OnDemand for Academics, so I need others to try and test it: above all with a SAS 9.4 server at their company, and on Windows or Linux. Please tell me what works and what doesn't. More features will come. Install: in VS Code open Extensions (Ctrl+Shift+X), search DataStep Studio, Install. Marketplace page: https://marketplace.visualstudio.com/items?itemName=datastep-labs.datastep-studio What it does Run with one key. F4 runs the program or the selection. Also Run To Line, Run From Line, Run Step, Run As Macro and Resolve Code (the code a macro call generates). A log that points back to your code. ERRORs and WARNINGs appear in Problems at their line. The Suspicious Log lists only what needs a look: ERRORs, WARNINGs, and NOTEs such as uninitialized variables, merges with repeats of BY values, or missing values generated. Data at a glance. A data viewer with WHERE, filters, sorting and frequencies. Tick the values to keep, and the SAS condition is written for you. The session in view. Libraries with variables and labels, macro variables, and every system option. Autocomplete that knows SAS. Procedures, options, functions, your librefs, data sets and columns, with the SAS documentation one hover away. proc so + Enter writes the whole PROC SORT with DATA= and BY filled in. Your files where SAS is. Open your SAS OnDemand home as a folder and edit the programs there, or keep them on your computer: the project is synced to the server, so %INCLUDE "macros/setup.sas" and relative paths work. DATA step debugger. Step through a DATA step statement by statement with the PDV in the Variables view, conditional breakpoints ( age > 14 ) and Jump to Cursor. The macro debugger Debugging a macro usually means MPRINT, MLOGIC and %PUT. In DataStep Studio you step through a macro like through any other program: Call pane. Debug Macro opens the call above the definition with every parameter by name: fill in the values and start. Step Into, Over and Out through %LET, %IF, %DO and nested macro calls; the call stack shows which macro called which. Macro variables of each macro in the Variables view (global and automatic on request). Hover &name. for its value, or change a value to try another path through the macro. Conditional breakpoints in macro language: &i. = 3 stops a %DO loop only in its third pass. Debug Console. Evaluate macro expressions such as %EVAL(&n. * 2) , or run SAS code inside the paused macro. Code coverage after the run: every macro line shows how often it ran (×4), and lines never reached are marked. The picture and the video use a small example: %sum_of_squares(4) adds 1² + 2² + 3² + 4² and calls %square for each number. Getting started (about 5 minutes) You need Java 8 or newer and Python 3.8 or newer. SASPy is installed for you. DataStep Studio: Check Setup (Command Palette, Ctrl+Shift+P) finds Java and Python and installs SASPy with one click. DataStep Studio: Add New Connection Profile: SAS OnDemand (your region and user ID) or a SAS 9.4 server (host, port, user). The password is asked once and kept in your system's keychain. Open a .sas file and press F4. The full manual is inside VS Code: DataStep Studio: Open Manual, short recipes in Open How-To Guide, and the videos in Watch the 2-Minute Tour and Watch the Macro Debugger Video. What I would like to know Did the installation and the first connection work? How long did it take, and where did you get stuck? Which features do you use, and what is missing for your daily SAS work? Anything that behaves differently from SAS Enterprise Guide or SAS Studio in a way that surprised you. So far I could test it only with SAS OnDemand for Academics, and mainly on macOS. Reports from SAS 9.4 servers, Windows and Linux are especially welcome. Please reply here, or use Q & A on the Marketplace page. DataStep Studio: Report a Problem copies an error message with the versions of VS Code, Java, Python and SASPy (home folders hidden) for you to paste. Your data stays yours DataStep Studio collects nothing: no telemetry, no usage data. Your code, data and logs go only to your own SAS session. The password stays in your system's keychain. Editions Community is always free: all run modes, the log views, the data viewer, the session views, autocomplete, the SAS Server window and project sync. Professional adds the DATA step and macro debuggers, smart code, Enlarge/Optimize macro calls and Git on the SAS server. During Community Early Access, all Professional features are available free of charge. Early Access is temporary. Professional functionality may require a paid license following the Early Access period. Free Community functionality will remain available. I am still thinking about how this will look after Early Access. For now, let's build this together and make an awesome SAS editor to work with. Thank you for trying it! DataStep Studio is an independent project and is not affiliated with or endorsed by SAS Institute Inc. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc.
... View more
The code is from the link below.
Solved: Re: How to save out PLOT/Picture explicitly?! - SAS Support Communities
Somehow, I run and did not see the picture file. The file location seems alright.
ods _all_ close;
options nodate nonumber;
options papersize=(7.35in 5.40in);
options leftmargin="0.001in" rightmargin="0.001in";
title;
ods printer printer=png file="e:\temppic\composite.png";
ods layout gridded columns=2 rows=2 advance=proc
column_gutter=0.1in row_gutter=0.1in;
ods graphics / width=3.5in;
proc sgplot data=sashelp.applianc(where=(cycle<=20));
scatter y=units_1 x=cycle;
run;
proc sgplot data=sashelp.applianc(where=(cycle<=20));
scatter y=units_2 x=cycle;
run;
proc sgplot data=sashelp.applianc(where=(cycle<=20));
scatter y=units_3 x=cycle;
run;
proc sgplot data=sashelp.applianc(where=(cycle<=20));
scatter y=units_4 x=cycle;
run;
ods layout end;
9330 ods layout end;
9331 ods _all_ close;
NOTE: ODS PRINTER printed 1 page to C:\Users\Lenovo\composite.png.
9332 options nodate nonumber;
9333 options papersize=(7.35in 5.40in);
9334 options leftmargin="0.001in" rightmargin="0.001in";
9335 title;
9336 ods printer printer=png file="e:\temppic\composite.png";
NOTE: Writing ODS PRINTER output to DISK destination "e:\temppic\composite.png", printer "PNG".
9337 ods layout gridded columns=2 rows=2 advance=proc
9338 column_gutter=0.1in row_gutter=0.1in;
9339 ods graphics / width=3.5in;
9340 proc sgplot data=sashelp.applianc(where=(cycle<=20));
9341 scatter y=units_1 x=cycle;
9342 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.31 seconds
cpu time 0.09 seconds
NOTE: There were 20 observations read from the data set SASHELP.APPLIANC.
WHERE cycle<=20;
9343 proc sgplot data=sashelp.applianc(where=(cycle<=20));
9344 scatter y=units_2 x=cycle;
9345 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.16 seconds
cpu time 0.01 seconds
NOTE: There were 20 observations read from the data set SASHELP.APPLIANC.
WHERE cycle<=20;
9346 proc sgplot data=sashelp.applianc(where=(cycle<=20));
9347 scatter y=units_3 x=cycle;
9348 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.15 seconds
cpu time 0.04 seconds
NOTE: There were 20 observations read from the data set SASHELP.APPLIANC.
WHERE cycle<=20;
9349 proc sgplot data=sashelp.applianc(where=(cycle<=20));
9350 scatter y=units_4 x=cycle;
9351 run;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.12 seconds
cpu time 0.00 seconds
NOTE: There were 20 observations read from the data set SASHELP.APPLIANC.
WHERE cycle<=20;
9352 ods layout end;
... View more
I am generating tons of plots from SGPLOT.
Need to eye-peek plots. Surely the splots have own finename and they are popped out at
Result Viewer. I need to save them out with simple M-by-N layout (line-up to tell any diff)
permenantly.
Anyway to do this?!
... View more
Two weeks to go, Hackers! Make sure everyone on your team has accepted the Terms & Conditions, and don’t forget to share your Hackathon journey on social media using #SASHackathon.
... View more
I am trying to configure either an ODBC or OLE DB connection between Power BI and SAS GRID 9.4 M6.
I have struggled to find content online to help. Therefore, I thought I'd share what steps I have done but also I'm a little bit stuck.
OLE DB
I have successfully connected to my environment after installing the OLE DB drivers from November 2018.
The connection string is the following:
provider=sas.IOMProvider;data source=iom-name://SASApp - Logical Workspace Server;sas port=0;sas protocol=2;sas metadata user id=<userid>;sas metadata password=<password>;sas metadata location=iom://<SAS Metadata Server Address:8561
I guess the good thing is that I can connect and can see the default SASHELP and MAPS libraries.
Problems:
I cannot see any other tables. How do I expose additional data?
There are pre-assigned libraries in the metadata but none are exposed to the OLE DB. I can see these libraries in other SAS tools (SAS Studio etc).
I have tried adding the following at the end of the connection string. None of the tables in that library were visible.
SAS Workspace Init Script="LIBNAME libref 'path'";
Question: What am I missing to expose this data?
ODBC
I managed to configure the ODBC for SAS drivers on my laptop after installation to connect to the SAS/SHARE server running on the environment.
I had a similar results to the OLE DB where I was only getting SASHELP and MAPS libraries.
My system admin looked to add additional libraries within SAS/SHARE to expose them to PowerBI but now I am getting the following error:
Error Message:
Container exited unexpectedly with code 0xC0000374. PID: 7536.
Used features: Odbc.DataSource/SASDRV32.DLL/09.04.0000/SAS/9.04.01M6P110718.
My system admin can see that the connection is being created as before and there's no error messages in the logs.
I've tried to search for a resolution for this code without finding one.
Question: Does anyone have any suggestions?
... View more