Help using Base SAS procedures

How to set up the work directory in SAS

Reply
Contributor
Posts: 38

How to set up the work directory in SAS

Hi,

I would like my data to be stored in an imlstore that I have provided the link for:

libname sqldb ODBC dsn='sqlBLS' schema=IO2012;

libname imlstore 'C:\Users\hze1\Desktop\SAS\BLSData';

/*Read in 177x177 transaction matrix and 1x177 value added row*/

data Zmatrix;set sqldb.nominaluse_FMB_2012;

if FMBcom ne 196;/*FMBcom 196 is value added*/

drop c196;/*c196 is final demand*/

proc sort;by stat_year FMBcom;

run;

data Zcom; set Zmatrix ;

keep stat_year fmbcom;

run;

=======================

data Zmatrix and Zcom are storing in work directory which is different from the imlstore directory.

I realized that if I use imlstore.Zmatrix will go to my imlstore directory, is there any way to skip the imlstore.Zmatrix and jsut use the Zmatrix and have the data at imlstore.

Thank you

PROC Star
Posts: 1,322

Re: How to set up the work directory in SAS

Hi,


Check out the user= system option.

It allows you to specify that datasets with one-level names be written to a permanent directoy instead of work, e.g.:

297  options user="d:\junk";
298  data x; x=1;run;
NOTE: The data set USER.X has 1 observations and 1 variables.

--Q.

Ask a Question
Discussion stats
  • 1 reply
  • 140 views
  • 0 likes
  • 2 in conversation