BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
yportne1111
Calcite | Level 5

Please provide a simple example of how I can make a work.import file into a sas7bdat file. In other words I have a dataset in my work library with the default name import. I want to save it as import.sas7bdat.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Personally I prefer to "import" directly into the library:

 

libname mylib "<some path>";

proc import datafile="<path>filename.ext" 
       out=mylib.mydatasetname
   <other Import options>
run;

If you are using widgets to run the import then if you have the LIBRARY assigned before using the widget you should be able to indicate that library as the destination for the imported data.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

This is probably the simplest way:

data '\Myfolder\import';
  set work.import;
run;

But using a LIBNAME is better:

libname MyLib '\Myfolder';

data MyLib.import;
  set work.import;
run;

 

ballardw
Super User

Personally I prefer to "import" directly into the library:

 

libname mylib "<some path>";

proc import datafile="<path>filename.ext" 
       out=mylib.mydatasetname
   <other Import options>
run;

If you are using widgets to run the import then if you have the LIBRARY assigned before using the widget you should be able to indicate that library as the destination for the imported data.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 590 views
  • 2 likes
  • 3 in conversation