DATA Step, Macro, Functions and more

Code to create permanent data set

Reply
Occasional Contributor
Posts: 11

Code to create permanent data set

DATA step creates a permanent SAS data set?

Super User
Posts: 7,757

Re: Code to create permanent data set

If you use a library other than work, yes.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Super FREQ
Posts: 8,861

Re: Code to create permanent data set

Posted in reply to KurtBremser

Hi:

  To illustrated Kurt's point.

cynthia

** temporary data set, will be in WORK library;
** WORK library is "cleared" at the end of every session;
data class;
  set sashelp.class;
  age_in_5_yrs = age + 5;
run;
  
** permanent data set will be in C:\mydata folder;
** and will persist after SAS session ends;
libname perm 'c:\mydata';
data perm.class;
  set sashelp.class;
  age_in_5_yrs = age + 5;
run;
Ask a Question
Discussion stats
  • 2 replies
  • 173 views
  • 0 likes
  • 3 in conversation