Connect for the first time
DataStep Studio: Check Setup → it finds Java and Python; if SASPy is missing, click Install SASPy. Then
DataStep Studio: Add New Connection Profile → SAS OnDemand for Academics → your home region (the code in the web address
of SAS Studio, e.g. euw1 = Europe 1) → your user ID → Connect Now → your password (asked once, kept in the
keychain). Open a .sas file and press F4.
Switch between SAS OnDemand and the company server
Add a second profile (SAS 9.4 server (IOM): host, port, user), then DataStep Studio: Switch Connection Profile. The status bar names the active profile; the next run connects with it.
Run only the step I am in
Put the cursor in the step and use Run Step in the editor's title bar (or the Command Palette). The dialog offers
what surrounds the cursor, innermost first: a single SQL statement (wrapped in PROC SQL; … QUIT;), the PROC or DATA
step, the macro call, the %MACRO definition. Press its digit or Enter.
Run everything up to here
Ctrl+F4: from the top of the program to the cursor line. A step that contains the line runs completely.
Find out why the log is not clean
Open the Suspicious Log tab (next to the SAS Log). It lists only ERRORs, WARNINGs and the NOTEs that matter (uninitialized variables, remerging, missing values generated, repeats of BY values, conversions …), from every run. Click a line: the cursor jumps to the statement that caused it. Errors / Warnings / Notes show or hide each kind.
Flag a NOTE our team does not accept
Settings → datastepStudio.log.suspiciousNotes → Add Item → a regular expression, for example
Table WORK\.\w+ created, with 0 rows. A known harmless message goes into datastepStudio.log.suspiciousIgnore.
Look at the data set I just made
F12 opens the last data set created (&SYSLAST). Or double-click it in Libraries, or press Ctrl+Alt+D with
the cursor on its name in the program.
Keep only two treatment arms in the data viewer
Click a cell in the treatment column, press Ctrl+Alt+I, tick the two values with Space, press Enter: the
WHERE box now holds trt01p IN ('Drug 10 mg', 'Drug 20 mg'). Ctrl+Alt+E keeps only the value of the cell,
Ctrl+Alt+R shows all rows again.
Write a PROC SORT in five seconds
Type proc so, press Enter on SORT (step). DATA= offers the data sets your program just made; press Tab
to go to BY, which already holds the keys (or the BY you used for that data set before). Tab again, done.
Type a WHERE value without looking it up
Type WHERE paramcd = ' — the values of PARAMCD in your data appear, the most frequent first.
Call my macro with all its parameters
Type % and the first letters of your macro (%deri for %derive_vars_dtm), press Enter: the call is written
with every parameter, comma first, the defaults filled in. Fill in the values with Tab. In the SAS Server window
a macro is offered once a program calls it; its definition is looked up on the server (the program's folder, the
folders above, their macros folders, SASAUTOS).
Clean up a long macro call
Cursor in the call, Ctrl+Shift+O: parameters at their default disappear. Ctrl+Shift+O again: the call goes on one line. Ctrl+Shift+E shows every parameter again. Both are also in the editor's right-click menu.
Tidy up a messy program
Right-click in the program → Format SAS Program: keywords upper, names lower, 2 spaces per level, = and IF / ELSE
aligned, long macro calls comma first. Select a few statements first to format only those. The header, strings,
DATALINES, macro text and your line breaks stay; Cmd+Z (Ctrl+Z) takes it back. The hints in Problems
(SAS style) show what it leaves to you, such as * comments or flag = (a = b);.
Debug a macro loop
Open the program with the macro, click the blue Debug Macro button in the title bar. In the call pane above the
definition fill in the parameters and click Start Debug. Click in the gutter of the %LET inside the loop to set a
breakpoint; right-click it → Edit Condition → &i. = 5. F5 runs to it; the Variables tab shows the macro
variables. After the run every line shows how often it ran.
Watch a DATA step work
Cursor in the DATA step, F5. F10 steps statement by statement; the Variables view shows the PDV. Hover a
variable for its value; a breakpoint with a condition (age > 14) stops only where it matters.
Change LINESIZE (or any system option)
Options tab → 🔍 → type linesize → Enter → type the new value → Enter. The row shows
(changed, was 132); ↺ puts the old value back.
Give a command my own key
F9 opens Keys. Click + next to the command and press the keys. A key another command had moves to this one. ↺ puts the default back.
Keep my layout
Arrange the SAS tabs as you like (drag them), then type WSAVE ALL in the SAS command box (Ctrl+Alt+C). The same
tabs open the next time SAS connects.
Keep my programs on my computer and run them on SAS OnDemand
Nothing to do: open the folder (or Git repository) in VS Code and press F4. The project's changed files go to
~/datastep-studio/<project>-<id> on the server before each run, and the program runs there, so %INCLUDE and LIBNAME
with relative paths work. Commit and push with Git as usual on your computer. The status bar shows the server folder;
a click opens it.
Copy a folder to the SAS server
Open the SAS Server window (DataStep Studio: Open SAS Server Folder) and drag the folder from Finder or Windows Explorer onto a folder in its Explorer.
Work directly on files on SAS OnDemand
DataStep Studio: Open SAS Server Folder opens a window on your SAS OnDemand home. Open, edit and save server programs as if
they were local; a program runs with SAS in its own folder, so %INCLUDE "macros/setup.sas" works.
See which edition I have
DataStep Studio: License and Edition. During Early Access it says Community Early Access and that all Professional features are available free of charge.