The SAS Language 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 Language 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 Language 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 Language block.
- Double-click the SAS Language block to display the SAS Language Editor view.
- In the SAS Language 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 Language Editor view and save the configuration when prompted.
A green execution status is displayed in the Output port of the SAS Language block and the new Working Dataset. The dataset contains observations from the input loan_data dataset where the income is at least £50,000.