BookmarkSubscribeRSS Feed

SAS Viya: Stand-Alone Custom Steps

Started ‎08-25-2022 by
Modified ‎08-25-2022 by
Views 1,815

With the July 2022 stable release (2022.1.3) there is now the capability to run a Custom Step in a stand-alone tab in the SAS Studio workspace.  In this blog, I will demonstrate working with a stand-alone custom step by using a custom step I created in a previous post.

 

Open a Custom Step in Stand-Alone Mode

 

To use a Custom Step outside of a SAS Studio Flow in stand-alone mode, you select to open the custom using the Open in a tab menu option.

 

1_CSAlone.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

  

This opens the custom step as a stand-alone step.

 

2_CSAlone.png

  

Notice that in stand-alone mode the input table and output table controls are visible whereas when the custom step is used in a flow they are simply input and output ports.  Based on this difference, I will want to edit the custom design to give more meaningful labels to these controls.  I will do that in the next section, but first let see how a custom step works in stand-alone mode.   In the stand-alone custom step tab, I make selections for the controls. 

 

I click 1_icon_CSAlone (1).png  to select the input and output table.  I also make my selections for State, County, and Cities.  I then click Run to execute the custom step in stand-alone mode.

 

 

3_CSAlone.png

  

The step executes the code in the custom step with the specified selections and the output is written to location selected.  You can view log by selecting Code panel and then Log tab.

 

4_CSAlone.png

  

You can also download the log, by selecting  2_icon_CSAlone.png  → Download, then you have the option download the log file as text or html.

 

5_CSAlone.png

 

 I confirm that the output was created in the location I specified.

 

6_CSAlone.png

 

Edit Custom Step for Stand-Alone Mode

 

Now that I have tested that my custom works in stand-alone mode, I want to make some changes to better support the stand-alone mode.  To do this I need to open the custom step in design mode by selecting Edit in Designer.

 

7_CSAlone.png

  

The custom step is now open, and I can make changes to its design.

 

8_CSAlone.png

  

I change the label for the input table control and assign a default library and table.  Note the default library and table selection is only used for stand-alone mode; it does not affect using the custom step in a flow.

 

9_CSAlone.png

  

For the output table control I update its label.

 

10_CSAlone.png

  

I save and close the custom step designer.  I then select  3_icon_CSAlone (1).png  on the stand-alone custom step tab to refresh it to the latest saved design and program for the custom step.

 

11_CSAlone.png

  

Note the labels for the input and output table have been updated as well as the default input table is already set.  You can click  1_icon_CSAlone (1).png   to change the default selection.  I make my selections and select Run to execute the custom step in stand-alone mode.

 

12_CSAlone.png

 

Save the Custom Step as a SAS Program

 

To save the stand-alone custom step with its selections as a SAS Program, after the custom step is run, then select Edit code.

 

13_CSAlone.png

  

This opens a tab with the SAS code based on the current selections and does NOT affect the saved custom step.  You can now save and run this code as a SAS program.

 

14_CSAlone.png

 

Schedule a Stand-Alone Custom Step as a Job

 

To schedule a stand-alone custom step as job, first select values for all the required controls.  Then, select  2_icon_CSAlone.png  → Schedule as a job.

 

15_CSAlone.png

 

Summary

 

Now custom steps can be used outside of SAS Studio Flows and be executed as a stand-alone task.  For more information review:

SAS Help Center: Working with Stand-Alone Custom Steps

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎08-25-2022 01:52 PM
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags