execute_sas_code
Executes SAS code in the Viya environment and returns job results, with persistent state across calls for reusing WORK tables, macro variables, and librefs.
Instructions
Executes the provided SAS code in the Viya environment and returns information about the completed Job. This will create a job definition for the SAS code, execute it, and then retrieve the results.
The code runs in a reusable compute session that is kept warm and shared
across calls (per user), so SAS state — WORK tables, macro variables, and
assigned librefs — persists between successive execute_sas_code calls.
Call reset_compute_session to discard that state and start fresh.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sas_code | Yes | the SAS code snippet to be executed using the Viya Job Execution API Service |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||