A Sublime Text package for SAS programming
Python SAS
Clone or download
Pull request Compare This branch is 133 commits ahead of jakob-stoeck:master.
Roy Pardee
Roy Pardee Added a new setting for file encoding, which will default to utf-8, b…
…ut can be changed by the user if need be. Also added error handling for the encoding exception that's thrown when we try to open the log file w/the wrong encoding.
Latest commit 2d5bb8d Aug 10, 2018
Permalink
Failed to load latest commit information.
preferences move additional preference file to subfolder Apr 8, 2015
snippets Added a snippet to produce a tab-delimited file for import into R. May 14, 2018
syntaxes Update highlighting for strings May 14, 2018
.gitignore Use native Python threading instead of sublime.set_timeout_async May 26, 2016
AUTHORS.md fix bad sync May 3, 2015
Default.sublime-keymap Minor snippet tweaks. May 20, 2014
LICENSE correct MIT License Apr 9, 2015
Main.sublime-menu Added a menu item to allow quick access to SAS_Package.sublime-settin… Mar 9, 2016
README.md Still learning markdown apparently. :( May 9, 2017
SAS(function).sublime-completions Added _cesr standard vars to completions. Mar 14, 2018
SAS.sublime-build Succeeded in subbing python build script for the WSF. Still need to f… Jul 27, 2013
SAS.sublime-build.direct-call Use native Python threading instead of sublime.set_timeout_async May 26, 2016
SasWrap.wsf Small tweak on teradata stdvars snippet; saswrap.wsf. Jan 14, 2014
info.plist initial commit Jul 12, 2010
run_sas_program.py Added a new setting for file encoding, which will default to utf-8, b… Aug 10, 2018
show_next_error.py Added a menu item to allow quick access to SAS_Package.sublime-settin… Mar 9, 2016
test.sas Minor fixes to log syntax; removed now-unnecessary teradata version o… Feb 3, 2017
test1.sas Trivial change to test https connectivity to github. Jul 8, 2016
test2.sas Use native Python threading instead of sublime.set_timeout_async May 26, 2016
wishlist.txt Tweaked syntax for date literals; tweaked some snippets. Jun 10, 2016

README.md

SAS Programming Package for Sublime Text 3

A modest package for doing SAS programming.

Features

Syntax definitions (highlighting) for SAS Programs and .log files. A build system that

  1. Batch-submits the currently-showing program to your local install of SAS.
  2. Waits for said program to finish.
  3. Opens the resulting .log file and checks it for errors or warnings (via a user-configurable regular expression). A macro (bound to ctrl-e) for jumping from error/warning to error/warning in your log.

Snippets!

  1. 'sql' starts up a proc sql - quit block.
  2. 'mac' creates the shell of a macro.
  3. 'mloop' creates a shell macro that loops through all the vars in a dataset (saving you from having to remember where to put the double-ampersands).
  4. 'frq' starts up a FREQ call.
  5. 'srt' starts up a SORT call.
  6. 'tp' starts up a TRANSPOSE call.
  7. Many more!

Indentation rules. Completions.

Installation

Installation is via the wonderful Package Control. Choose 'Package Control: Install Package' off the command palette and then find 'SAS Programming' on the resulting list.

Once that's done, create a trivial sas program (e.g., proc print data = sashelp.class ;), save it to a file (e.g., deleteme.sas) and hit ctrl-b to 'build' (aka batch-submit) your program. One of two things will happen:

  1. The package will find your copy of sas.exe in the location it expects, and the program will be batch-submitted (probably 20% of installs).
  2. The package will not find sas.exe where it's expected and it will prompt you to tell it where your sas.exe is.

If you get outcome 2 there, use the menus to navigate to Preferences -> Package Settings -> SAS -> Settings-User. That will open up the preferences file. Find and edit the value listed for the "sas-path" at the bottom. Enter the full path to your local copy of sas.exe. Windows users, note that backslash characters need to be escaped (doubled up) to be properly read.

To-Do

  1. Polish build system.
  2. Play a sound at the finish of a job to call attention?
  3. Distinguish the taskbar icon from ST3's on the dialog that informs users that a build is complete?
  4. (Possible?) Bring (relevant instance of) ST3 to the fore upon dismissing finish dialog.
  5. Tap into built-in 'results view' stuff for error/warning navigations.