Help using Base SAS procedures

save work file in a permanent folder

Accepted Solution Solved
Reply
Contributor mei
Contributor
Posts: 62
Accepted Solution

save work file in a permanent folder

I have a very big workfile in the work folder. as files saved in work folder is temporary, is there any best and fastest method to save the work file to another folder for permanent storage.

(other than the following data step:

data output.permanet;

    set work.want;

run; )

thanks


Accepted Solutions
Solution
‎03-28-2012 08:33 AM
Super User
Super User
Posts: 7,039

save work file in a permanent folder

You could use PROC COPY.

proc copy inlib=work outlib=output ;

  select want;

run;

This will copy WORK.WANT to OUTPUT.WANT.

View solution in original post


All Replies
Super User
Posts: 10,020

save work file in a permanent folder

Usa another library to instead of WORK library.

libname x v9 'c:\temp\';
options user=x;
data class;
 set sashelp.class;
run;

Ksharp

Contributor mei
Contributor
Posts: 62

save work file in a permanent folder

this is the error log:

  libname output v9 'D:\MeiYee Folder\My Documents\PhD\Data Analysis\output';

NOTE: Libname OUTPUT refers to the same physical library as USER.

NOTE: Libref OUTPUT was successfully assigned as follows:

      Engine:        V9

      Physical Name: D:\MeiYee Folder\My Documents\PhD\Data Analysis\output

300  options user=output;

301  data want3;

302   set sashelp.want3;

ERROR: File SASHELP.WANT3.DATA does not exist.

303  run;

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set OUTPUT.WANT3 may be incomplete.  When this step was stopped there were 0

         observations and 0 variables.

WARNING: Data set OUTPUT.WANT3 was not replaced because this step was stopped.

NOTE: DATA statement used (Total process time):

      real time           0.02 seconds

      cpu time            0.00 seconds

can you help?

Frequent Contributor
Posts: 139

save work file in a permanent folder

sashelp is automatic library which is assigned in sas session.you have to use your own library

Super User
Posts: 10,020

save work file in a permanent folder

As manojinpec said. SASHELP is a default library. You need define yourself library.

Contributor mei
Contributor
Posts: 62

save work file in a permanent folder

i open the work file and click save as 'new file name' in the new library name/directory...this also work right?

Frequent Contributor
Posts: 139

save work file in a permanent folder

Yes it would work.But if you want to do in programme you need to do as suggested.

Contributor mei
Contributor
Posts: 62

save work file in a permanent folder

Posted in reply to manojinpec

thanks, will try this out definitely. mei

Solution
‎03-28-2012 08:33 AM
Super User
Super User
Posts: 7,039

save work file in a permanent folder

You could use PROC COPY.

proc copy inlib=work outlib=output ;

  select want;

run;

This will copy WORK.WANT to OUTPUT.WANT.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 21494 views
  • 5 likes
  • 4 in conversation