sonmic
asked on
Delete an external file
Hi,
Code below will not work. Can't find the problem.
Tx
Code below will not work. Can't find the problem.
Tx
DATA _NULL_ ;
%LET XX1 = c:\Data\xx1.xls ;
%LET XX2 = c:\Data\xx2.xls ;
%LET XX3 = c:\Data\xx3.xls ;
RUN ;
%MACRO checkFile (bestand = ) ;
%IF %SYSFUNC(fileexist(&bestand)) = 0 %THEN %DO ;
%END ;
%ELSE %DO ;
FILENAME MFile &bestand ;
DATA _NULL_ ;
rc = FDELETE(&bestand) ;
RUN ;
FILENAME &bestand CLEAR ;
%END ;
%MEND checkFile ;
%checkFile(bestand = &xx1) ;
%checkFile(bestand = &xx2) ;
%checkFile(bestand = &xx3) ;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if after trying what theartfuldazzler has said and is still not working, please post the log.
it's always easier to look at the log and help
it's always easier to look at the log and help
A few problems, mostly linked to quotation marks.
Open in new window