Posted By

webonomic on 11/15/11


Tagged

text convert dataset


Versions (?)

Convert SAS dataset to Text file


 / Published in: SAS
 

URL: http://jaredprins.com/sas/2011/11/14/convert-sas-dataset-to-text-file.html

This SAS macro will convert a dataset to a text file

  1. libname BC "C:\file\path";
  2.  
  3. %macro filecreate;
  4. %do x=1 %to 700;
  5. filename lb18 "C:\folder\lb&x..txt" LRECL=8006;
  6. data _null_;
  7. set BC.some_data (firstobs=&x obs=&x);
  8. file lb18 dsd dlm='09'x;
  9. put var1;
  10. run;
  11. %end;
  12. %mend;
  13.  
  14. %filecreate;

Report this snippet  

You need to login to post a comment.