?>Array ( [lang] => en [id] => 39 ) Edge Case Scenario: Handling Non-Existent Action Sets - WeAreCAS
builtins actionSetToTable

Edge Case Scenario: Handling Non-Existent Action Sets

Scénario de test & Cas d'usage

Business Context

A user is attempting to document a custom action set but makes a typo in the name. The system must be robust enough to handle this user error gracefully by reporting that the action set cannot be found, rather than creating an empty table or failing unexpectedly.
Data Preparation

No data preparation is needed for this scenario. The test relies on the absence of the specified action set.

Copied!
1/* No action set is defined for this test case */

Étapes de réalisation

1
Attempt to convert an action set named 'nonExistentActionSet', which has not been defined on the server.
Copied!
1PROC CAS;
2ACTION BUILTINS.actionSetToTable /
3 actionSet='nonExistentActionSet'
4 casOut={name='SHOULD_NOT_BE_CREATED', caslib='casuser'};
5RUN;
6QUIT;
2
Check if the output table was created. This action is expected to fail, confirming the robustness of the primary action.
Copied!
1PROC CAS;
2ACTION TABLE.tableInfo /
3 name='SHOULD_NOT_BE_CREATED';
4RUN;
5QUIT;

Expected Result


The `actionSetToTable` action in step 1 must fail. The CAS log should display an error message indicating that the action set 'nonExistentActionSet' was not found. Consequently, the `table.tableInfo` action in step 2 will also fail, confirming that the output table 'SHOULD_NOT_BE_CREATED' was never generated.