data _null_; file "&myopicshare/Loan Rpt1 SCRA2_&mToday..txt" lrecl=119 TERMSTR=crlf; set file22 ; PORT = 3621; SERVERUSER="&euserid."; SERVERPASS="&upass."; label; put @1 ssn $9. @10 dob $8. @18 last_name $26. @44 first_name $20. @64 loan_id $28. @92 duty_date $8. @100 Middle_Name $20. ; run; ERROR: Physical file does not exist, /sasgrid/hall1/sascompute/config94/Lev1/SASApp/
Can someone explain why I am getting a file not found error during export? I have the correct file path yet the error exists.
What are you expecting the following statements to accomplish?
They create variables, but the variables are never used so I think you're trying to connect to a server but that's not what this code does. And since it's a _null_ data step nothing is saved anywhere.
PORT = 3621;
SERVERUSER="&euserid.";
SERVERPASS="&upass.";
@Q1983 wrote:
data _null_; file "&myopicshare/Loan Rpt1 SCRA2_&mToday..txt" lrecl=119 TERMSTR=crlf; set file22 ; PORT = 3621; SERVERUSER="&euserid."; SERVERPASS="&upass."; label; put @1 ssn $9. @10 dob $8. @18 last_name $26. @44 first_name $20. @64 loan_id $28. @92 duty_date $8. @100 Middle_Name $20. ; run; ERROR: Physical file does not exist, /sasgrid/hall1/sascompute/config94/Lev1/SASApp/Can someone explain why I am getting a file not found error during export? I have the correct file path yet the error exists.
Best practice is to ensure that all file paths start with a DRIVE (windows) or a Disk mount. Anything else will be treated as relative to where SAS currently is executing which is often the SAS installation folders and you are very likely not to have write privileges to that location and so you cannot create a file, i.e. it does not exist.
These statements serve no purpose, so remove them:
PORT = 3621;
SERVERUSER="&euserid.";
SERVERPASS="&upass.";
label;
Add these statements before your DATA _NULL_ step:
%put "&myopicshare";
%put "&mToday";
run everything, and post the complete log.
Lev1/SASApp
is a part of the SAS configuration tree on the server, where only the SAS installation user has write permission. You cannot create files or directories there.
I guess your macro variable does not provide an absolute path starting at the root of the UNIX filesystem.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.