Convert sas7bdat into WPD



  • Sebastia Barcelo

    Hi Paulo,

    if you only want to use the sas7bdat datasets, you can simply define your library as sas7bdat:

    libname sasddbb sas7bdat "&path.";
    data XXX;
    set sasddbb.XXX;

    If you want to convert a full sas7bdat to wpd, you can do it using the following code:

    libname sasddbb sas7bdat "&path1.";
    libname wpdddbb "&path2.";

    proc datasets library=sasddbb ;
    copy in= sasddbb out=wpdddbb ;

    I hope this can help you.

    Comment actions Permalink
  • Stephen Farish

    Hi Paulo

    It's very easy, and I do this often - notice the physical locations I am using and the filenames...

    libname s sas7bdat 'D:\scratch';
    libname w wpd 'D:\scratch';
    data w.mydata; set s.mydata; run;

    WPS seems to differentiate the databases in the same physical folder according to their type (SAS or WPS) and doesn't get confused. The works both ways by the way, SAS --> WPS or WPS --> SAS

    So in the above example by Sebastio, the &path can be the same
    Of course, it also works if the locations differ and the filenames differ, I just wanted to show that you can keep your data in one place, and have "parallel" WPS and SAS databases of the same name in that place as well.

    Comment actions Permalink

Please sign in to leave a comment.