4

In SAS Studio, is it possible to save a snippet of code, such as a header, as an abbreviation so you can pull-up the code in future programs without having to type the whole thing in again? This can be achieved is SAS EG by selecting "Program > Add Abbreviation Macro", does SAS Studio have a similar option?

heyydrien
  • 971
  • 1
  • 11
  • 28
  • 1
    Hmm, no idea. If you don't get an answer here, try on communities.sas.com in the appropriate community; you might get a dev response there (especially if it's either possible, but hidden, or if it's in development). – Joe Jun 21 '17 at 14:15
  • And if it doesn't exist you can add it to the ideas for developers and people can vote on that feature. – Reeza Jun 21 '17 at 19:35

1 Answers1

2

The Snippet functionality is available in SAS Studio from version 3.1 on-wards.

Full details are on SAS support site here. To create your own snippet:

  1. Open your .sas file in SAS Studio and select the code that you want to save as a snippet.
  2. On the Code tab, click Add to My Snippets button. The Add to My Snippets dialog box appears.
  3. Enter a name for the snippet and click Save.

This snippet is now available from the My Snippets folder.

momo1644
  • 1,769
  • 9
  • 25