Where data is saved to sas using a stored process. using a local server (workspace)

I am using a stored process to run a set of queries and in that I create tables. The code works fine, but where is the table stored I don't get it since there are no errors in the log. Likewise, I used proc univariate, the result is displayed, but where will this result be stored? I am using the local workspace library for storage.

+3


source to share


2 answers


As you said, your results are stored in the working library. If you want to know where it is, you can see the path by running this code:

%put %sysfunc(getoption(work));

      

Be aware that the working library link is temporary and only applies to your current session. In addition, all datasets are temporary and are deleted at the end of the SAS session.



For a uniprocessor proc, you must specify the OUT = parameter and specify where you want to store the summary statistics. If the report you are running, use ODS destinations to store them in a permanent location.

Regards, Vasilij

+2


source


To find the path used by libname (in this case work

libname) use this code:

%put %sysfunc(pathname(work));

      

For any given output, it depends on your system settings, how SAS is started, etc. Your output will not necessarily be in the same folder as your work.

I would use this code on windows:



filename x pipe 'echo %cd%';  * WINDOWS COMMAND TO RETURN CURRENT WORKING DIRECTORY;

data _null_;
  infile x;
  input;
  put _infile_;
run;

      

On * nix, change the filename operator to:

filename x pipe 'pwd';  * UNIX/LINUX COMMAND TO RETURN CURRENT WORKING DIRECTORY;

      

Or, as Vasily suggested, use the OUT = option of the ODS instructions.

+2


source







All Articles