table

caslibInfo

Description

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.

table.caslibInfo <result=results> <status=rc> / active=TRUE | FALSE, caslib="string", showHidden=TRUE | FALSE, srcType="ALL" | "DNFS" | "ESP" | "LASR" | "PATH" | "S3", verbose=TRUE | FALSE;
Settings
ParameterDescription
activeWhen set to True and you do not specify the caslib parameter, information for the active caslib is shown.
caslibSpecifies the name of the caslib to show information for. If not specified, then information for all caslibs is shown.
showHiddenWhen set to True, hidden caslibs will be returned when requesting information for all caslibs.
srcTypeSpecifies the type of caslibs to show. This parameter is ignored if the caslib parameter is specified.
verboseWhen set to True, the results are more verbose, providing additional details.
Data Preparation View data prep sheet
Data Setup

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.

Copied!
1 
2PROC CAS;
3caslib myCaslib path='/path/to/
4data' dataSource={srcType='path'};
5caslib salesCas path='/path/to/salesdata' dataSource={srcType='path'};
6 
7RUN;
8 

Examples

This example displays a summary of all visible caslibs available in the current CAS session.

SAS® / CAS Code Code awaiting community validation
Copied!
1PROC CAS; TABLE.caslibInfo; RUN;
Result :
A result table listing all available caslibs with their basic information, such as name, type, and path.

This example demonstrates how to get detailed information for a single, specified caslib named 'myCaslib'.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3TABLE.caslibInfo / caslib='myCaslib';
4 
5RUN;
6 
Result :
A result set containing information specifically for the 'myCaslib' caslib.

This example uses the 'active' parameter to display information only for the currently active caslib.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3caslib myCaslib;
4TABLE.caslibInfo / active=true;
5 
6RUN;
7 
Result :
A result set showing the information for 'myCaslib', as it was set as the active caslib.

Using the 'verbose' parameter provides an extended set of details for each caslib, including attributes, scope, and server information.

SAS® / CAS Code Code awaiting community validation
Copied!
1PROC CAS; TABLE.caslibInfo / verbose=true; RUN;
Result :
A comprehensive result table with extended columns of information for all caslibs.

This example filters the caslibs to show only those of type 'PATH', which are caslibs based on a server file system path.

SAS® / CAS Code Code awaiting community validation
Copied!
1PROC CAS; TABLE.caslibInfo / srcType='PATH'; RUN;
Result :
A result table listing only the caslibs that are of the 'PATH' data source type.

FAQ

What is the purpose of the caslibInfo action?
What does the 'active' parameter do?
How can I specify a particular caslib to get information about?
How can I view hidden caslibs?
What is the 'srcType' parameter used for?
What is the effect of the 'verbose' parameter?