Unlike most SAS procedures which terminate with a RUN; statement, PROC DATASETS is an interactive procedure. This means it remains active and locks the library until it encounters a QUIT; statement or a new PROC or DATA step. Always ensure you include an explicit QUIT; (as shown in your code) to release the library lock and prevent "Resource is in use" errors later in your program.
Type : CREATION_INTERNE
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 | 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 feature allows user-defined formats to be stored in SAS catalogs or in a format library on t...
This document provides SAS code examples to display information about SAS libraries and their mem...