Hi
I'm trying to delete a csv file from the home directory in sas
I was using
data_null_;
rc=fdelete("~/nameoffile.csv");
run;
but it seems not working
There is any command I can use for the scope?
Solved with the following :
filename test "/r/ge.unx.sas.com/vol/vol110/u11/spndac/final_&dd&mm&yy..csv";
data _null_;
rc=fdelete('test');
put rc=;
run;
Try using the full path?
The documentation seems to expect a fileref, not the path, did you try that approach?
@dcortell wrote:
Hi
I'm trying to delete a csv file from the home directory in sas
I was using
data_null_;
rc=fdelete("~/nameoffile.csv");
run;
but it seems not working
There is any command I can use for the scope?
Hi
Tested both :
data _null_;
rc=fdelete("/r/ge.unx.sas.com/vol/vol110/u11/spndac/final_&dd&mm&yy..csv");
run;
data _null_;
ff=("/r/ge.unx.sas.com/vol/vol110/u11/spndac/final_&dd&mm&yy..csv");
rc=fdelete(ff);
run;
The files are still there
D
Solved with the following :
filename test "/r/ge.unx.sas.com/vol/vol110/u11/spndac/final_&dd&mm&yy..csv";
data _null_;
rc=fdelete('test');
put rc=;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.