BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
yosiahds
Calcite | Level 5

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.

1-overview.png

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

(view in My Videos)

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.

2-suspicious-log.png

  • 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.

3-data-viewer.png

  • 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.

4-datastep-debugger.png

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.

5-macro-debugger.png

(view in My Videos)

Getting started (about 5 minutes)

  1. You need Java 8 or newer and Python 3.8 or newer. SASPy is installed for you.
  2. DataStep Studio: Check Setup (Command Palette, Ctrl+Shift+P) finds Java and Python and installs SASPy with one click.
  3. 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.

6-connection-profile.png

  1. 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.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

For readers, I will point out that SAS developed and maintains an official SAS extension for VS Code.

 

There is a team of developers who respond to issues, add features, and take suggestions from the community. This official extension connects to SAS 9.4 and SAS Viya, and is used within solutions such as SAS Viya Workbench. Find it in VS Code or on the official marketplace here.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

View solution in original post

1 REPLY 1
ChrisHemedinger
Community Manager

For readers, I will point out that SAS developed and maintains an official SAS extension for VS Code.

 

There is a team of developers who respond to issues, add features, and take suggestions from the community. This official extension connects to SAS 9.4 and SAS Viya, and is used within solutions such as SAS Viya Workbench. Find it in VS Code or on the official marketplace here.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 161 views
  • 4 likes
  • 2 in conversation