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 (February 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 8 Feb 2001 09:56:25 -0800
Reply-To:     Meredith Clark <clarkmeredith@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Meredith Clark <clarkmeredith@YAHOO.COM>
Subject:      Re: copying hundreds of directories-SOLVED
In-Reply-To:  <9D17D648E4EBD311AD45009027D0DF939E9A7C@mcdc-atl-64.cdc.gov>
Content-Type: text/plain; charset=us-ascii

Thanks to everyone for their timely assistance, especially Ian Whitlock for the rest of the solution. In case this can help anyone else, here's my complete program: [ (saved as a text file i:\cdas8\crtdir.txt) ROUTINE CreateDirectoryA MINARG = 2 MAXARG = 2 STACKPOP = CALLED MODULE = KERNEL32 RETURNS = SHORT; ARG 1 CHAR FORMAT=$CSTR200. ; ARG 2 NUM FORMAT=IB4. ;

]

(now program)

libname client6 v6 'q:\conv\client'; libname client8 v8 'q:\conv\client8'; filename SASCBTBL 'i:\cdas8\crtdir.txt';

data files; rc=filename('dir','q:\conv\client'); dirid=dopen('dir'); numsel=dnum(dirid); do i=1 to numsel; clname=dread(dirid,i); cllib='q:\conv\client8\'||clname; rc = modulen('CreateDirectoryA',cllib,0) ; output; end; rc=close(dirid); run; proc print data=files; run;

%macro copy8 (clname= ); libname in6 v6 "q:\conv\client\&clname"; libname out8 v8 "q:\conv\client8\&clname"; proc copy in=in6 out=out8; run; %mend;

data _null_; set files (keep=clname); call execute ( '%copy8(clname=' ||trim(clname) || ')'); run;

===== Meredith Clark Senior Programmer/ Applications Developer Harte-Hanks Data Services

__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/


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