| Date: | Tue, 10 Feb 2004 04:34:56 -0800 |
| Reply-To: | Raja <absimip@YAHOO.CO.IN> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Raja <absimip@YAHOO.CO.IN> |
| Organization: | http://groups.google.com |
| Subject: | Re: Text Substitution |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Hi Tom,
By making slight chage to the Dennis program, you can print all 100
file names using the following macro.
/* n= number of files. In this case it is 100. This will work only
when you have 1 - 100 series files. Pls check for syntax errors. I
have not run it.*/
%macro repeat(n=);
% do i = 1 to n;
filename indat 'C:\Documents and
Settings\barrymanilow\Desktop\EAP&i..PH2';
filename outdat 'C:\Documents and
Settings\barrymanilow\Desktop\EAP&i..txt';
data one (keep=Slope Threshold);
infile indat lrecl=32000 truncover;
file outdat;
input TheData $255.;
if substr(trim(left(TheData)),1,1) eq 'I' and
substr(trim(left(TheData)),10,1) ne ' ' then do;
Threshold=scan(TheData,3,'|');
Slope=scan(TheData,4,'|');
put Slope Threshold;
end;
run;
%end;
%mend repeat;
%repeat(n=100);
Hope this helps.
Cheers,
Raja
|