LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page