LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 Jul 2005 21:38:20 -0700
Reply-To:     shiling99@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shiling99@YAHOO.COM
Organization: http://groups.google.com
Subject:      Re: Passing a dynamic variable to a macro
Comments: To: sas-l@uga.edu
In-Reply-To:  <1121304937.688593.105240@g47g2000cwa.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

Take it easy and take a easy way. Run the pgm twice and take look the log and modify slightly.

data file_loc; length i $2 filepath $50; file 'c:\temp\file_loc.txt'; do i = '1','10','15'; filepath='c:\temp\'||i; fdate=put(100*input(i,2.),mmddyy10.); put filepath fdate; end; run;

options noxwait;

data _null_; length filepath $50 fdate 8 cmd $100; infile 'c:\temp\file_loc.txt'; input filepath fdate mmddyy10.; if fileexist(filepath) then do; put 'file location ' filepath 'exist.' ; end; else do; cmd=cat('md ', trim(filepath),'\',put(fdate,yymmdd8.)); put cmd; call system(cmd); end; run;


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