Sample 46680: How to list all the names and types of SAS files in a library, including the file sizes and number of observations and variables
Use the DETAILS option in the CONTENTS statement to add columns of information, such as the number of indexes, observations, and variables, to the default PROC DATASETS directory output, and the NODS option to suppress the contents of individual data files.
See the Full Code tab for example code that can generate this report as a PDF file instead of the SAS log.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The Full Code tab illustrates how to add columns of information to the default PROC DATASETS output, but suppress the traditional PROC CONTENTS type output for individual data files. The NODS option in the CONTENTS statement and the DATA=_ALL_ option suppress the contents information for individual data files. The output is restricted to a list of files showing the additional columns with the number of indexes, observations, and variables for the data sets.
You can also suppress the repetitive printing of the directory information to the SAS log by using the NOLIST option, and then route the output to a PDF file.
/* To run this code successfully, first modify the LIB= option in the PROC DATASETS */
/* statement and specify an active library reference. */
ods pdf file="c:\datasets.pdf" style=styles.sasweb startpage=no;
proc datasets lib=xx nolist;
contents data=_all_ details nods;
quit;
ods pdf close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
You can add columns of information to the default PROC DATASETS output, but suppress the traditional PROC CONTENTS type output for individual data files.
Date Modified: | 2012-05-29 14:01:10 |
Date Created: | 2012-05-25 19:19:42 |
Operating System and Release Information
SAS System | Base SAS | Aster Data nCluster on Linux x64 | | |
DB2 Universal Database on AIX | | |
DB2 Universal Database on Linux x64 | | |
Greenplum on Linux x64 | | |
Netezza TwinFin 32bit blade | | |
Netezza TwinFin 32-bit SMP Hosts | | |
Netezza TwinFin 64-bit S-Blades | | |
Netezza TwinFin 64-bit SMP Hosts | | |
Teradata on Linux | | |
z/OS | | |
Z64 | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows XP Professional | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |