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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 562 views
  • 2 likes
  • 3 in conversation