The SAS block enables you to use SAS language functionality supported in WPS which is not available as a discrete block in Workflow.
The following demonstrates how to use the SAS block to filter the input dataset (loan_data.csv, containing observations each of which describes a completed loan and the person who took the loan) based on the value of a numeric variable Income:
- Import the loan_data.csv dataset onto a Workflow using the Text File Import block.
- Expand the Code Blocks group in the Workflow palette, then click and drag a SAS block onto the Workflow canvas.
- Click the Output port of the loan_data dataset block and drag a connection towards the Input port of the SAS block.
- Double-click the SAS block to display the SAS editor view.
- In the SAS editor view:
- In the Outputs panel, click Add new output dataset.
- In the SAS editor, enter the following:
DATA &Output_1; SET &Input_1; IF Income>=50000 THEN OUTPUT; RUN;
- Close the SAS editor view and save the configuration when prompted.
A green execution status is displayed in the Output port of the SAS block and the new Working Dataset. The dataset contains observations from the input loan_data dataset where the income is at least £50,000.