sas, error messages, fdelete, delete xlsx file
up vote
0
down vote
favorite
I am trying to delete an XLSX file on the unix server and getting error messages. Below is my code. How can I delete this file in SAS EG? I need code to do this. Below are the error messages that I am getting.
filename myfile "/server/department/users/id/test/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
filename myfileclear;
ERROR: Invalid logical name.
ERROR: Error in the FILENAME statement.
sas
add a comment |
up vote
0
down vote
favorite
I am trying to delete an XLSX file on the unix server and getting error messages. Below is my code. How can I delete this file in SAS EG? I need code to do this. Below are the error messages that I am getting.
filename myfile "/server/department/users/id/test/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
filename myfileclear;
ERROR: Invalid logical name.
ERROR: Error in the FILENAME statement.
sas
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to delete an XLSX file on the unix server and getting error messages. Below is my code. How can I delete this file in SAS EG? I need code to do this. Below are the error messages that I am getting.
filename myfile "/server/department/users/id/test/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
filename myfileclear;
ERROR: Invalid logical name.
ERROR: Error in the FILENAME statement.
sas
I am trying to delete an XLSX file on the unix server and getting error messages. Below is my code. How can I delete this file in SAS EG? I need code to do this. Below are the error messages that I am getting.
filename myfile "/server/department/users/id/test/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
filename myfileclear;
ERROR: Invalid logical name.
ERROR: Error in the FILENAME statement.
sas
sas
edited Nov 13 at 14:27
asked Nov 13 at 14:21
coder1167
1076
1076
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59
add a comment |
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
I believe the error relates to your last filename statement, where the ref is longer than 8 chars and the clear runs into the filename. I suspect if you add a space it will be fine.
filename myfileclear;
Should be:
filename myfile clear;
add a comment |
up vote
0
down vote
This worked for me. I deleted filename myfileclear;.
%let outdir=/server/department/users/id/test;
filename myfile "&outdir/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
proc export DATA=OUT1.POP_ID_5C
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "POP_ID";
proc export DATA=OUT1.REQ_1_4_04T1
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "REQ_1_4";
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
I believe the error relates to your last filename statement, where the ref is longer than 8 chars and the clear runs into the filename. I suspect if you add a space it will be fine.
filename myfileclear;
Should be:
filename myfile clear;
add a comment |
up vote
3
down vote
accepted
I believe the error relates to your last filename statement, where the ref is longer than 8 chars and the clear runs into the filename. I suspect if you add a space it will be fine.
filename myfileclear;
Should be:
filename myfile clear;
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
I believe the error relates to your last filename statement, where the ref is longer than 8 chars and the clear runs into the filename. I suspect if you add a space it will be fine.
filename myfileclear;
Should be:
filename myfile clear;
I believe the error relates to your last filename statement, where the ref is longer than 8 chars and the clear runs into the filename. I suspect if you add a space it will be fine.
filename myfileclear;
Should be:
filename myfile clear;
answered Nov 13 at 16:08
Reeza
12.9k21126
12.9k21126
add a comment |
add a comment |
up vote
0
down vote
This worked for me. I deleted filename myfileclear;.
%let outdir=/server/department/users/id/test;
filename myfile "&outdir/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
proc export DATA=OUT1.POP_ID_5C
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "POP_ID";
proc export DATA=OUT1.REQ_1_4_04T1
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "REQ_1_4";
add a comment |
up vote
0
down vote
This worked for me. I deleted filename myfileclear;.
%let outdir=/server/department/users/id/test;
filename myfile "&outdir/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
proc export DATA=OUT1.POP_ID_5C
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "POP_ID";
proc export DATA=OUT1.REQ_1_4_04T1
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "REQ_1_4";
add a comment |
up vote
0
down vote
up vote
0
down vote
This worked for me. I deleted filename myfileclear;.
%let outdir=/server/department/users/id/test;
filename myfile "&outdir/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
proc export DATA=OUT1.POP_ID_5C
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "POP_ID";
proc export DATA=OUT1.REQ_1_4_04T1
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "REQ_1_4";
This worked for me. I deleted filename myfileclear;.
%let outdir=/server/department/users/id/test;
filename myfile "&outdir/POP_ID.xlsx";
data _null_;
rc=fdelete("myfile");
run;
proc export DATA=OUT1.POP_ID_5C
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "POP_ID";
proc export DATA=OUT1.REQ_1_4_04T1
OUTFILE= "&outdir/POP_ID.xlsx"
DBMS=xlsx REPLACE ;
SHEET = "REQ_1_4";
answered Nov 13 at 14:47
coder1167
1076
1076
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283115%2fsas-error-messages-fdelete-delete-xlsx-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Good practice is to serve the file read-only through a web service download. That way you can replace it (delete/recreate) without worrying about file locks, as could happen if file opened by Excel from a network share.
– Richard
Nov 13 at 16:59