BookmarkSubscribeRSS Feed

Discover the Possibilities: SAS® Visual Studio Code Extension Q&A, Slides, and On-Demand Recording

Started ‎02-28-2024 by
Modified ‎02-28-2024 by
Views 295

Watch this Ask the Expert session to learn how you can use this new editor to optimize coding workflow. 

 

Watch the webinar

 

You will learn:

  • How to use the SAS Visual Studio code extension.
  • About SAS notebooks.
  • How the integration can help in your everyday work.

 

The questions from the Q&A segment held at the end of the webinar are listed below and the slides from the webinar are attached.

 

Q&A

When converting your SASNB to a flow, is there a way to name each node through the SASNB?

Currently, it just takes the type of program that it is and adds that. I'm not sure if there's already a feature request, but that is a cool suggestion. Please take a look at the issues list and suggest it as a feature.

 

Can I use this with SAS GRID?

SAS Grid does not support IOM or SSH based SAS session creation. You can open a feature request on GitHub for this, to get it assessed further.

 

Is there any way to export the cells of a notebook into a plain .sas program?

Not directly. Currently, there is only the conversion to the SAS flows, where you can generate a SAS file of the complete flow, but not of the separate cells.

 

What is the biggest advantage (in your opinion) of SAS Visual Studio Code Extension, compared to SAS Enterprise Guide?

I like the flexibility of the Visual Studio Code in general because I'm the type of programmer that works with multiple languages. I also prefer the ability to completely customize this experience to my needs. I'm not much of a visual programmer, so I don't need the abilities that Enterprise Guide unlock for me. But I'm very much a code heavy user, so I enjoy the complete customization I can do inside of VS Code.

 

Is there a way to enable autocompletion as we saw in the presentation, but for custom macros (e.g., Macros Library)?

No. You get the same auto complete in the normal SAS coding interface that come as the default. But a great feature idea that you should definitely open up as a feature request on GitHub.

 

Hi! Clearly, if I already use VS Code this is a great tool. If I'm already using EG or Studio, would there be any benefits to transitioning to VS Code, or should I just continue with my work method? Alternatively, are there any benefits to EG or Studio that I don't get in VS Code?

This question is similar to an earlier one, but I’ll address that question at the end. We want to reach you as programmers where you are. A lot of people are in Visual Studio Code and would like to also program SAS there, so that's why this makes a lot of sense. But if you are a person who enjoys maybe just quickly creating a query inside of Enterprise Guide or SAS Studio, then why switch? It's exactly right, you don't have to switch if you are a very code heavy user. Visual Studio Code I believe is an interesting thing to look at. Try it out. It could unlock some new creativity or performance for you. But if you are already very satisfied with Enterprise Guide or SAS Studio, there's no need to switch. You're not missing out on anything.

 

What is IOM?

IOM is a connection technology that is part of SAS 9.4 on a server. I'm not sure what it exactly stands for. It's a connection method to that can be used inside of Enterprise Guide, though most people probably use the metadata-based authentication with Enterprise Guide. IOM is just an alternative to that.

 

Is it possible to download result data set and report produced from SAS program ran in Visual Studio code?

If you have run a SAS code, you can save and copy the results pane, and also the SAS log that was generated in the output window you saw below. That's functionality that comes with VS Code. The SAS extension itself doesn't directly access your local machine; it always works through that VS Code interface. If you generate an output like a PDF that the SAS extension can't display, then the best method on Viya is to save that file to SAS content and just download it from there. For SAS 9.4 servers, you will need to have a mapped shared folder that you can access both on the SAS 9.4 server and your local machine.

 

How well can you visualize changes made to a SAS notebook tracked in git?

The SAS notebook, similar to other notebook conventions, are JSON files that are usually written as a one-line JSON. So, visualizing any changes in there isn't the best of experiences. Even if you add a PewDiePie step to have the broken-up JSON that is more humanly readable, you will still see changes that are related to adding or removing cells. Because cells can also contain output that you save along with it, it's not the greatest experience with any types of these notebooks to save them into git. That's why I'm such a big fan of this conversion to flows as an example to make use of those kind of features.

 

Is there anything like a 'batch submit' sort of concept, where I submit a program & have my log written to a separate file, so I have a permanent record of what I did?

I don't think so because VS Code is very much an interactive application. If you, for example, close it, your SAS session will also be terminated along with that. It's very client dependent in that way. What you could do is if you submitted the log to print, move that log to a separate file, and make use of other functionalities in that way.

 

Can we use SAS VS code to connect SAS Metadata server in SAS 9.4? And how do I use them to connect to SAS Viya 4?

Connecting just to the metadata server is currently not possible. You have to connect to a SAS 9.4 server using either SSH or IOM. Please open a features request accordingly for metadata. Log in on that. The second question on how do you connect to VS Code? Let me quickly jump back to a previous slide (slide number 5) on that to you need to fill out this information. You need to know the Viya endpoint, the compute context that you want to use. A default one is prefilled for you. Also, if you just set up SAS Viya with a relatively recent release then you will already have a client and you can just pace through all those different setup steps. You don't need to have any specialized knowledge for that. This would also enable you to, if you're using DS code, you can open a local SAS program, run it on 9.4, see what the output looks like, connect to your SAS Viya instance, run your code there, and compare and convince yourself that it's still SAS that's running underneath.

 

In which industries would SAS Visual Code Extension be most useful?

The SAS Visual Studio Code Extension is not industry specific; it is a generic SAS coding tool to help you write, read, and run SAS code. The usefulness depends on the user, if you are a code centric person, that does not use any of the visual features of SAS Studio or SAS Enterprise Guide, then try it and see if it works for you.

 

Does the SAS lib feature come in SAS 9?

Currently, as of SAS Visual Studio Code Extension version 1.7.1, this is only supported for SAS Viya. There is already a feature request open to add this feature to SAS 9 based connections, add your support to this feature request by liking it here.

 

I tried to configure SAS Windows, but I could not see the SAS libraries, but I can write and execute the code.

Currently, as of SAS Visual Studio Code Extension version 1.7.1, this is only supported for SAS Viya. There is already a feature request open to add this feature to SAS 9 based connections, add your support to this feature request by liking it here.

 

Is it possible to connect to SAS Viya 4 from VS Studio using Viya HTTP URL? Which URL will we need to use?

It is the same URL that I used to open the SAS Viya 4 environment from your browser.

 

I don't get the run icon or option.

Ensure you installed the SAS Visual Studio Code Extension in Visual Studio Code. Next create an example SAS program, e.g., test.sas, open it and now you should see the run icon in the top right corner.

 

Is it possible to do the SAS PyCharm extension?

There are currently no plans for a SAS extension for PyCharm, as the current effort is on Visual Studio Code.

 

Can you share the settings.json template that is used in the demo?

Yes, you can grab the settings.json template along with additional explanations from this SAS Community article.

 

SAS Content viewing currently only works with Viya. Are there plans to make it compatible with Local 9.4?

Currently, as of SAS Visual Studio Code Extension version 1.7.1, this is only supported for SAS Viya. There is already a feature request open to add this feature to SAS 9 based connections, add your support to this feature request by liking it here.

 

Are SAS Notebooks compatible with SAS 9?

Yes, except the Python cell type, as this requires Proc Python, which is only available with SAS Viya 4.

 

Is the SAS Integration Client licensed separately from SAS/BASE?

No, you can download the SAS Integration Technology Client from this SAS Support page. All you need is an SAS Community profile to sign in.

 

Does SAS corporation review changes made by external developers to SAS Visual Code Extension to make sure they are appropriate?

Yes, there is a code review in place. To read more about this process please check out this document.

 

 

Recommended Resources

SAS VS Code Extension

SAS VS Code Extension GitHub Repository

SAS VS Code Extension SAS Community Article

Please see additional resources in the attached slide deck.

 

Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from other SAS Ask the Expert webinars.

Version history
Last update:
‎02-28-2024 02:17 PM
Updated by:

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Article Tags