How to Rebuild or Repair your Damaged SAS Datasets

In this tutorial we will guide you how to rebuild or repair you damaged SAS dataset using proc dataset procedure.Sometime due to some memory or physical storage issue the dataset get damaged and not accessible.

How to Repair your Damaged SAS Datasets

To repair your damaged SAS dataset we can use below code:

 

PROC DATASETS LIB= <LIBRARY NAME> NOLIST;
REPAIR <DATASET NAME>;
RUN;
QUIT;

 

Here you have replace the highlighted item with your requirement i.e.

  • <LIBRARY NAME> -> Library name where the damaged dataset is available.
  • <DATASET NAME> -> Name of damaged dataset.

How to Rebuild your Damaged SAS Datasets

To repair your damaged SAS dataset we can use below code:

 

PROC DATASETS LIB= <LIBRARY NAME> NOLIST;
REBUILD <DATASET NAME> \NOINDEX;
RUN;
QUIT;

 

Here you have replace the highlighted item with your requirement i.e.

  • <LIBRARY NAME> -> Library name where the damaged dataset is available.
  • <DATASET NAME> -> Name of damaged dataset.
  • NOINDEX  -> It specifies to delete the disabled indexes and integrity constraints.

Hope you are now more clear how you can Rebuild or Repair your Damaged SAS Datasets. Feel free to comment if you have any query or error you’re while executing this code.

Happy Learning !!