execute_sas_code
Run SAS code in a Viya compute session that retains state across calls, allowing you to execute programs and retrieve logs, output, and results.
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 | |||