Help using Base SAS procedures

convert work dataset to permanent dataset in the SAS University Ed

Reply
New Contributor
Posts: 4

convert work dataset to permanent dataset in the SAS University Ed

[ Edited ]

Thanks to Reeza's motivating me, I succeeded in importing an Excel dataset, and converting it into a work dataset. How do I now convert the work dataset into a permanent dataset within a dubdirectory of myfolders? Also, please let me know exactly how I can find your response in this community blog center, so that I can comment on it? I was not able to find your response to my prior question. I just had the response in theemail you sent me.

 

To create the work dataset I followed the following directions:

  1. Click Server Files and Folders in the navigation pane and browse to find the file that you want to import.
  2. Right-click the file that you want to import and select Import Data. The top of the Import Data tab shows the name and location of this Excel file. It also shows several options that you can customize.
    3. To specify the location to save the output data set, click Change( iI WAS UNSUCCESSFUL IN DOING THIS. I WANTED TO SAVE THE DATASET IN 
    myfolders\hss)
    By default, the output data set is saved to the Work library, which is a temporary location. The contents in this library are deleted when you exit SAS Studio
    1. To generate SAS variable names from the data values in the first row of the worksheet, select Generate SAS variable names. If a data value in the first row in the input file is read and it contains special characters that are not valid in a SAS name, such as a blank, then SAS converts the character to an underscore.
    2. To import the Excel worksheet, click Submit SAS Code.
    .
Super User
Posts: 18,588

Re: convert work dataset to permanent dataset in the SAS University Ed

Your original post is here. You can get to it by clicking your name icon and it will take you to your profile page. 

https://communities.sas.com/t5/SAS-Analytics-U/New-University-Edition-user-stuck-on-Proc-Import/m-p/...

 

To create a 'permanent' library set up a library in SAS and then assign the data to the new library.

 

libname myWork '/folders/myfolders/myWork/';

data myWork.myDataset;
set  myDataset;
run;
New Contributor
Posts: 4

Re: convert work dataset to permanent dataset in the SAS University Ed

Thanks very much!

Regular Contributor
Posts: 226

Re: convert work dataset to permanent dataset in the SAS University Ed

I see someone has provided code to read and copy the work.data_set

 

no need to read it, just

 

proc copy in   = work
          out  = my_lib;
          select my_data;

Ron Fehd  CPU seconds counter

New Contributor
Posts: 4

Re: convert work dataset to permanent dataset in the SAS University Ed

thanks
Ask a Question
Discussion stats
  • 4 replies
  • 104 views
  • 1 like
  • 3 in conversation