CATALOG Procedure
Example 3: Using the FORCE Option with the KILL Option
Features: |
- PROC CATALOG statement::
- CATALOG= argument
- FORCE option
- KILL option
QUIT statement
RUN statement
|
Details
This example
-
creates a resource environment
-
tries to delete all catalog entries
by using the KILL option but receives an error
-
specifies the FORCE option to successfully
delete all catalog entries by using the KILL option.
Program
%macro matt;
%put &syscc;
%mend matt;
proc catalog c=work.sasmacr kill;
run;
quit;
Program Description
Start a process (resource environment).Do this by opening the catalog entry MATT in the
WORK.SASMACR catalog.
%macro matt;
%put &syscc;
%mend matt;
Specify the KILL option to delete all catalog entries
in WORK.SASMACR. Since there is a resource
environment (process using the catalog), KILL does not work and an
error is sent to the log.
proc catalog c=work.sasmacr kill;
run;
quit;
SAS Log
1 %macro matt;
2 %put &syscc;
3 %mend matt;
4
5 proc catalog c=work.sasmacr kill;
NOTE: Writing HTML Body file: sashtml.htm
6 run;
ERROR: You cannot open WORK.SASMACR.CATALOG for update access because WORK.SASMACR.CATALOG is in
use by you in resource environment _O_TAGS.
WARNING: Command CATALOG not processed because of errors noted above.
7 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CATALOG used (Total process time):
real time 6.46 seconds
cpu time 0.62 seconds
Program
proc catalog c=work.sasmacr kill force;
run;
quit;
Program Description
Add the FORCE option to the KILL option to delete the
catalog entries.
proc catalog c=work.sasmacr kill force;
run;
quit;
SAS Log
8 proc catalog c=work.sasmacr kill force;
9 run;
NOTE: Deleting entry MATT.MACRO in catalog WORK.SASMACR.
10 quit;
NOTE: PROCEDURE CATALOG used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
Copyright © SAS Institute Inc. All rights reserved.