BookmarkSubscribeRSS Feed
gemax
Calcite | Level 5
Hello,

since few days ( many many days 😞 ), i try to create an exteranl file ( on a SAS server ) like this :

filename TAB_OUT '/_my_path_server_/.../_my_files_/_my_file_.txt' lrecl=21 ;

data CREATE ; set TAB_IN ;

sep = ';' ;

file TAB_OUT ;

put var1 3. sep $1.
var2 $16. sep $1. ;


First - Is this syntaxe looks like correct ?
Second - Why SAS, when i run this prog, returm to me this message : ERROR: Physical file does not exist, /_my_path_server_/.../_my_files_/_my_file_.txt.
Sure, i know it does't exist anymore, i want to create it !!!!

someone can "light my lantern", please ?
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi!
You can get that message if ANY part of your PATH is wrong. For example, let's say that I have a directory called "C:\temp" on my machine. This filename statement:
[pre]filename mytmp 'c:\tmp\newfile.txt';[/pre] would be WRONG because I misspelled the directory name (assuming that I don't have a c:\tmp directory). The message that I would get would be:
ERROR: Physical file does not exist, c:\tmp\newfile.txt

because SAS went out to try and write newfile.txt and could not find the correct directory path already in existence. SAS will not create a directory, you must write to a directory path that already exists and that you have the permission to write to.

I recommend that you double check your Path name and that you have write access to the directory in the path that you are trying to write to.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 874 views
  • 0 likes
  • 2 in conversation