Scénario de test & Cas d'usage
For this scenario, no initial data prep is needed. The test will begin by attempting to load from a table that has not been created yet. The table will be created mid-test.
| 1 | /* No |
| 2 | data prep needed. The test starts with a failure condition. */ |
| 1 | PROC CAS; |
| 2 | BUILTINS.actionSetFromTable / |
| 3 | TABLE={name='non_existent_table', caslib='CASUSER'}; |
| 4 | RUN; |
| 5 | QUIT; |
| 1 | PROC CAS; |
| 2 | BUILTINS.defineActionSet / name='emergency_tools', actions={{name='ping', definition={code='print("Ping successful.");'}}}; |
| 3 | RUN; |
| 4 | BUILTINS.actionSetToTable / actionSet='emergency_tools', TABLE={name='emergency_repo', caslib='CASUSER', replace=true}; |
| 5 | RUN; |
| 6 | QUIT; |
| 1 | PROC CAS; |
| 2 | BUILTINS.actionSetFromTable / |
| 3 | TABLE={name='emergency_repo', caslib='CASUSER'}; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | BUILTINS.actionSetInfo / actionSet='emergency_tools'; |
| 3 | RUN; |
| 4 | QUIT; |
The first step must generate an error in the CAS log, indicating the source table was not found. After the table is created in step 2, the action in step 3 should execute successfully. The final verification in step 4 will confirm that the 'emergency_tools' action set is loaded, demonstrating the system's ability to recover from an initial failure.