07.08.2013 Views

SAS 9.1.3 Intelligence Platform: System Administration Guide

SAS 9.1.3 Intelligence Platform: System Administration Guide

SAS 9.1.3 Intelligence Platform: System Administration Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

108 Repairing Problematic Data Sets R Chapter 13<br />

/* use proc copy to re-create the contents of the original repository<br />

directory in the temporary directory */<br />

proc copy in=reposdir out=tempdir noclone;<br />

run;<br />

/* use proc contents on the new directory to verify that compress and<br />

reuse are set correctly */<br />

proc contents data=tempdir._all_;<br />

run;<br />

3 Use an operating system command to swap the directory names.<br />

When you use PROC COPY, you must have enough space to store two copies of all of<br />

the repository data sets. If only a few data sets are affected, you might prefer to use the<br />

DATA step. The following code fragment illustrates the use of a DATA step:<br />

/* set the correct system options for the <strong>SAS</strong> session and assign a libref<br />

to the original and temporary repository directories */<br />

options compress=no reuse=no;<br />

libname reposdir ’C:\<strong>SAS</strong>\EntBIServer\Lev1\<strong>SAS</strong>Main\MetadataServer\<br />

MetadataRepositories\Foundation’;<br />

libname tempdir ’C:\<strong>SAS</strong>\EntBIServer\Lev1\<strong>SAS</strong>Main\MetadataServer\<br />

MetadataRepositories\FoundationTemp’ compress=no;<br />

/* execute a data step similar to the following one for each data set that<br />

needs to be repaired */<br />

data tempdir.data-set-name;<br />

set reposdir.data-set-name;<br />

run;<br />

After re-creating the data sets, use operating system commands to copy the modified<br />

data sets to the source directory.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!