Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_castabload.sas File Reference

Checks if a CAS table is loaded; if not, loads and promotes it. More...

Go to the source code of this file.

Detailed Description

Runs in SPRE against an active CAS session. Accepts a SAS libref, derives the CAS caslib and session UUID from sashelp.vlibnam, then checks whether the table is already in-memory. If not, locates the owning CAS server via the casManagement REST API, queries the table endpoint to discover the source file and caslib, then loads and promotes the table.

A CAS session must already be established by the caller, eg:

cas mysess;
libname mylib cas caslib=Public;
%mv_castabload(lib=mylib, table=BASEBALL)
Parameters
[in]lib=SAS libref for the CAS caslib
[in]table=Name of the CAS table to load
[in]mdebug=(0) Set to 1 to enable verbose logging:
  • echoes resolved parameters
  • prints tableExists result
  • enables mprint/notes during PROC calls

SAS Macros

Definition in file mv_castabload.sas.