1.

How to count missing value in SAS?

Answer»

We can clear the libref through one of the below approaches:-

  • Using Libname Statement:-

We can use the below syntax to disassociate a specific library

Syntax : LIBNAME libref <CLEAR>

Example : Libname temp_lib clear where temp_lib is the libref that you WANT to deassign If, we would like to disassociate all the libref that we have declared in a SAS    Session, then use the below-modified version

LIBNAME _ALL_ <CLEAR>         Example: Libname _ALL_ clear
  • Using the Libname Function : -

   We can use the LIBNAME function to deassign a library reference. In case, a warning or an error occurs then a message is written to the SAS log.

   %if (%sysfunc(libname(temp_lib))) %then   %put %sysfunc(sysmsg());

where temp_lib is the libref that you want to deassign.

Note:- In both the above approaches libref is cleared if and only if there are no open files that are ASSOCIATED from that libref.

  • Using SAS Explorer Window:-

On the Explorer window go to libraries. Right click on the library that you want to design and select delete. Once you click on Delete you will receive a Delete confirmation with the text "Are you sure you want to remove the library reference NAMED temp_lib?". Once you click Ok, the same is going to get DELETED.



Discussion

No Comment Found