/* Specify the location of the SAS dataset you want to parse into individual tex t files.

*/ libname mydata 'd:\data\'; %macro filecreate; /* Set the look threshold from 1 to however many records either in the entire fi le or however many you wish to have in your testing set. */ %do x=1 %to 100; /* Set up the location to send the text files and the names of the text files. In this sample files called myfile1.txt through myfile100.txt will be written to d:\data\docs. */ filename textfile "D:\Data\Docs\myfile&x..txt" recfm=v lrecl=2048; data _null_; /* Point to the actual SAS dataset you are parsing. */ set mydata.mysasdataset (firstobs=&x obs=&x); file textfile; /* The put statement specifies which variable in the dataset will be written to the text files. In this case, the variable is called comments. */ put comments; run; %end; %mend; %filecreate;

Sign up to vote on this title
UsefulNot useful