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.
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.
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.
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 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.
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.
You can also download the log, by selecting → Download, then you have the option download the log file as text or html.
I confirm that the output was created in the location I specified.
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.
The custom step is now open, and I can make changes to its design.
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.
For the output table control I update its label.
I save and close the custom step designer. I then select on the stand-alone custom step tab to refresh it to the latest saved design and program for the custom step.
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 to change the default selection. I make my selections and select Run to execute the custom step in stand-alone mode.
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.
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.
To schedule a stand-alone custom step as job, first select values for all the required controls. Then, select → Schedule as a job.
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.
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 16. Read more here about why you should contribute and what is in it for you!
Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning and boost your career prospects.