The caslibInfo action displays information about one or more caslibs. It can show details for all caslibs, a specific caslib, or filter them by type (e.g., PATH, DNFS, S3). This is a fundamental action for managing data sources and understanding the available data libraries in a CAS session.
| Parameter | Description |
|---|---|
| active | When set to True and you do not specify the caslib parameter, information for the active caslib is shown. |
| caslib | Specifies the name of the caslib to show information for. If not specified, then information for all caslibs is shown. |
| showHidden | When set to True, hidden caslibs will be returned when requesting information for all caslibs. |
| srcType | Specifies the type of caslibs to show. This parameter is ignored if the caslib parameter is specified. |
| verbose | When set to True, the results are more verbose, providing additional details. |
This code sets up two caslibs, 'myCaslib' and 'salesCas', which can be used in the examples. 'myCaslib' points to a general data path, while 'salesCas' is specifically for sales data.
| 1 | |
| 2 | PROC CAS; |
| 3 | caslib myCaslib path='/path/to/ |
| 4 | data' dataSource={srcType='path'}; |
| 5 | caslib salesCas path='/path/to/salesdata' dataSource={srcType='path'}; |
| 6 | |
| 7 | RUN; |
| 8 |
This example displays a summary of all visible caslibs available in the current CAS session.
| 1 | PROC CAS; TABLE.caslibInfo; RUN; |
This example demonstrates how to get detailed information for a single, specified caslib named 'myCaslib'.
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.caslibInfo / caslib='myCaslib'; |
| 4 | |
| 5 | RUN; |
| 6 |
This example uses the 'active' parameter to display information only for the currently active caslib.
| 1 | |
| 2 | PROC CAS; |
| 3 | caslib myCaslib; |
| 4 | TABLE.caslibInfo / active=true; |
| 5 | |
| 6 | RUN; |
| 7 |
Using the 'verbose' parameter provides an extended set of details for each caslib, including attributes, scope, and server information.
| 1 | PROC CAS; TABLE.caslibInfo / verbose=true; RUN; |
This example filters the caslibs to show only those of type 'PATH', which are caslibs based on a server file system path.
| 1 | PROC CAS; TABLE.caslibInfo / srcType='PATH'; RUN; |