Desktop productivity for business analysts and programmers

Create an external datasets !!!

Occasional Contributor
Posts: 6

Create an external datasets !!!


since few days ( many many days Smiley Sad ), 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 ?
Posts: 9,428

Re: Create an external datasets !!!

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.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation