Inicio > Programming > Eliminando todos los data sets de una Librería SAS

Eliminando todos los data sets de una Librería SAS

La siguiente macro les permite eliminar todos los data set de una Librería:

%macro del_all_ds(lib=);
Proc datasets library = &lib kill memtype=data nodetails nolist;
quit;
%mend;
Ejemplo: %dell_all_ds(lib=Work);


Espero les sirva!
SASludos,
Alberto

Advertisement
Categorías:Programming
  1. Santi
    noviembre 16, 2011 a las 10:05 pm | #1

    SABRIAN DECIRME COMO PUEDO SABER, SI ES QUE SE PUEDE, LA ÚLTIMA FECHA EN QUE HA SIDO CONSULTADA UNA TABLA SAS?

    • noviembre 16, 2011 a las 11:15 pm | #2

      Este query te dice cuando fue la ultima vez q la tabla fue modificada, desafortunadamente no indica si la tabla fue consultada
      Proc SQL;
      Select * from sashelp.vtable where libname=’SASHELP’ and memname=’CLASS’;
      quit;
      sin embargo si tus data sets estan en Unix, entonces tienes solucion, usando ls -lu puedes obtener la fecha/hora de ultimo acceso a tu data set. lo puedes automatizar en SAS usando pipe. Supongo q lo mismo se puede hacer en Windows.

  1. Aún no hay trackbacks

Deja un comentario

Fill in your details below or click an icon to log in:

Logo de WordPress.com

You are commenting using your WordPress.com account. Log Out / Cambiar )

Twitter picture

You are commenting using your Twitter account. Log Out / Cambiar )

Facebook photo

You are commenting using your Facebook account. Log Out / Cambiar )

Connecting to %s

Seguir

Get every new post delivered to your Inbox.