Write and run SAS programs in your web browser

SAS Studio Snippets

Reply
Contributor
Posts: 29

SAS Studio Snippets

Hi, has anyone ever installed/distributed custom company/environment snippets in sas/studio?  we have the shipped set but wanted to create custom code to distribute to all users and the my snippets functionality limits them to the active user.  any ideas?

 

thanks

SAS Employee
Posts: 147

Re: SAS Studio Snippets

Posted in reply to to_the_point

The short answer is that there's not an elegant way to do this yet, but we're working on one.

 

You can put task files (.CTM & .CTK) and snippet files (.SAS) on shared drives where authorized users can access them or you can email these files to other users to save locally. Then the user can access the file via Studio's file navigation and open them in Studio. However, to have the file show up in My Tasks or My Snippets for easy use, the user must save them in those locations themselves via the Studio interface. Since this is not an optimal solution, we're adding the concept of SAS Studio Repositories to the next release of Studio to make it easier to share & publish tasks & snippets. The idea is that a developer will be able to deploy a repository made up of .CTM, .SAS, and XML & HTML files defining the repository to the Internet or internally to a local application server at a company or university. All the Studio user needs is a URL to enter into their Studio preferences and the repository will be displayed in their task/snippet navigation. Administrators will be able to configure global repositories for all users so each user won't have to define them manually in the preferences dialog. 

 

I don't have a good way yet for you to try this out or see more complete doc but I'm very interested to hear your thoughts as to whether this would meet your needs or if you have other ideas.

Occasional Contributor
Posts: 5

Re: SAS Studio Snippets

As mentioned in What’s New in SAS Studio 3.5 repositories are now available. I yet miss a documentation about it.

Where can I get the document SAS Studio Developer's Guide: Working with SAS Studio Repositories noted in the link above?

SAS Employee
Posts: 147

Re: SAS Studio Snippets

Posted in reply to AHallauer

The new repositories feature is indeed in Studio 3.5 but we've had to delay releasing the doc you mention as we're waiting for a download to be ready that the doc uses in its examples.  I'm hoping to have it all out in the next couple of weeks and will re-post here.  So sorry for the delay!

Occasional Contributor
Posts: 5

Re: SAS Studio Snippets

Yet I found the Developer's Guide to Repositories at the Documentation page for SAS Studio.

 

I just played with repositories.xml, repository.xml, ... but I can't realise a "global repository".

The repository is shown in the snippets- and tasks-tree in SAS Studio, but can not connect to the repository.

I think the problem is that I don't know what to enter as URI in the repositories.xml for the repository.xml, located in the same directory.

 

Is it a must to use a "web-hosting service"? Even if the repositories.xml is located in the same directory as all other files that define the repository?

SAS Employee
Posts: 14

Re: SAS Studio Snippets

Posted in reply to AHallauer

SAS Studio Repositories are accessed via HTTP.  You will need a web hosting service to use them.  A simple file system will will not suffice.

 

There are several free, easy to deploy web servers available for download.  Personally, I have had success with Apache Tomcat.

 

-Shannon

Occasional Contributor
Posts: 5

Re: SAS Studio Snippets

Posted in reply to rshannonsmith_SAS

Unfortunately it isn't so easy for us, cause we have to work in a secured environment. Set up the web host process (quick and dirty) is only a part of what to do. A much bigger part is to configure the process save and visible (firewalls, open ports, user security, documentation, ...)

 

I hoped that it's much easier to access "the files" located on same host as SAS Studio.

SAS Employee
Posts: 14

Re: SAS Studio Snippets

Posted in reply to AHallauer
I see. I checked with the developers responsible for SAS Studio Repositories. They confirmed that the repository content is served via HTTP.

An alternative you may want to consider is defining a global folder shortcut. You could store bits of code in SAS files stored in a read-only network location. Then, define a global folder shortcut to that location. It would show up for all SAS Studio users at your site.

This is not a perfect substitute for Snippets. It may meet your need.

Thanks,
Shannon
Ask a Question
Discussion stats
  • 7 replies
  • 1276 views
  • 2 likes
  • 4 in conversation