How to convert SAS7BDAT files to WPD?
To convert .sas7bdat datasets to .wpd datasets you can use PROC COPY with the appropriate database engine.
For example, suppose you have .sas7bdat datasets located at c:\Temp\sas\dataset1.sas7bdat etc … and an empty folder called c:\Temp\altairslc.
The following code should generate an equivalent DATASET1.wpd dataset in C:\Temp\altairslc.
libname slib sas7bdat "C:\Temp\sas";
libname alib "C:\Temp\altairslc";
proc copy in=slib out=alib;
run;
and will convert *all* sas7bdat datasets in c:\Temp\sas to wpd datasets in c:\Temp\altairslc
If there is an index file alongside the sas7bdat file then an SLC index file will be created alongside the WPD file.
Meanwhile Catalogs and Views must be re-created in SLC format from the original SAS language source code that created them.
Dataset | .sas7bdat | .wpd |
Catalog | .sas7bcat | .wpccat |
Index | .sas7bndx | .wpdidx |
View | .sas7bvew | .vw |
Stored Item | .sas7bitm | .wpditm |
Caveats:
Not every item of metadata in a SAS7BDAT dataset is preserved in the copied WPD dataset. You can use PROC CONTENTS to see the metadata of a data set and you can use PROC COMPARE to compare the 'before' and 'after' data sets before and after the copy.
Be sure to re-create any user-defined formats in SLC catalogs using original source code because you cannot convert SAS7BCAT files into SLC formats.