Convert SAS dataset to Text file


/ Published in: SAS
Save to your folder(s)

This SAS macro will convert a dataset to a text file


Copy this code and paste it in your HTML
  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;

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.