Scénario de test & Cas d'usage
Execution of SAS FCMP functions within the CAS environment.
Discover all actions of fcmpactThis scenario simulates the registration of 100 external C function prototypes for bioinformatics. A SAS macro is used to generate the `routineCode` parameter string array to avoid manual repetition and test performance with a large number of inputs. The goal is to test performance, the `encode` option, and the `saveTable` option.
| 1 | %macro generate_protos(num_protos); |
| 2 | %let proto_list =; |
| 3 | %DO i = 1 %to &num_protos; |
| 4 | %let proto_list = &proto_list "proto gene_analyzer_&i.(double) returns double;" |
| 5 | %IF &i < &num_protos %THEN %let proto_list = &proto_list,; |
| 6 | %END; |
| 7 | &proto_list |
| 8 | %mend generate_protos; |
| 1 | PROC CAS; |
| 2 | fcmpact.addPrototypes |
| 3 | routineCode={%generate_protos(100)}, |
| 4 | package="GenomicsToolkit", |
| 5 | encode=true, |
| 6 | saveTable=true, |
| 7 | funcTable={name="genomics_lib", caslib="casuser", replace=true}; |
| 8 | RUN; |
| 9 | QUIT; |
| 1 | PROC CAS; |
| 2 | TABLE.fileInfo caslib="casuser"; |
| 3 | RUN; |
| 4 | QUIT; |
The action should execute without performance degradation and create a permanent, encoded CAS table named `genomics_lib.sashdat` in the `casuser` caslib. The `table.fileInfo` result should list `genomics_lib.sashdat`, confirming its persistence. The log will confirm the successful creation and saving of the encoded table. It is not possible to directly view the encoded content, which is the expected behavior of `encode=true`.