The example uses a data set referenced by a 'health' library. The creation of the 'group' data set is not directly provided in this example, but it is assumed to have been created in a previous example ('Modifying SAS Data Sets'). For autonomy, it would be preferable to recreate a simple data set. However, as it refers to a previous modification, it is considered part of a coherent flow of examples and does not require undefined external data.
1 Code Block
PROC DATASETS
Explanation : This code block configures system options for display (page size, line size, date suppression, and initial page number). It then defines a SAS library named 'health'. The DATASETS procedure is called with the 'library=health' option to specify the library to manage and 'nolist' to avoid displaying the full list of library members. The CONTENTS statement is used to display information about the 'group' data set. The '(read=green)' option indicates that the 'group' data set is read-only, and 'out=grpout' creates a new data set 'grpout' which will contain the metadata of the 'group' data set.
Copied!
options pagesize=40 linesize=80 nodate pageno=1;
LIBNAME health 'SAS-library';
proc datasets library=health nolist;
contents data=group (read=green) out=grpout;
title 'The Contents of the GROUP Data Set';
run;
quit;
1
options pagesize=40 linesize=80 nodate pageno=1;
2
3
LIBNAME health 'SAS-library';
4
PROC DATASETS library=health nolist;
5
contents DATA=group (read=green) out=grpout;
6
title 'The Contents of the GROUP Data Set';
7
RUN;
8
QUIT;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.