I'm trying to make use of the setoutputslot functionality in Dataflux Studio, and I'm not sure I understand how to implement it. In the job that I'm working on there are 2 different types of files that I need to process. As the two different files are related to the same project and potentially we will receive the files at the same time, I'm trying to use two different data jobs within the same process job to process them. I'm using a process table reader to loop through the different filenames, and based on the filename have an expression node redirect the flow to the appropriate data job. Once its looped through both filenames in the process reader, and the process reader has an EOF status the job should end. Therefore, I assume that I need 3 output slots: one for filename #1, one for filename #2, and one for the exit. What I initially thought was that the expression node would support multiple output slots, and that the setoutputslot would be somewhat similar to a branch, where the flow was just redirected. I've tried to created create multiple output slots on the expression node but it only allows me one slot. How can I direct the flow if only 1 output slot is available? An example job using the setoutputslot functionality would be extremely appreciated.
You are on the right track with the expression node. Here is an example of how you'd create three output slots on your expression with 3 different labels and set one of them as the output slot. Note the comment at the top of the expression which is used by the UI to determine how many output slots the expression has
//! slot 0 Description for Path A
//! slot 1 Description for Path B
//! slot 2 Description for Path C
...your logic here...:
if some condition
setoutputslot(1)
else
setoutputslot(2)
You are on the right track with the expression node. Here is an example of how you'd create three output slots on your expression with 3 different labels and set one of them as the output slot. Note the comment at the top of the expression which is used by the UI to determine how many output slots the expression has
//! slot 0 Description for Path A
//! slot 1 Description for Path B
//! slot 2 Description for Path C
...your logic here...:
if some condition
setoutputslot(1)
else
setoutputslot(2)
Excellent! That's exactly what I was looking for. Thank you Andrew.
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!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.