BookmarkSubscribeRSS Feed
omega1983
Calcite | Level 5

libname adhoc_vb  pcfiles

path  = '//gaserver/myfile.sas7bat'

server= "2233";

port = 2234;

proc import datafile = '//gaserver/myfile.sas7bat'

out = order1;

dbms =

server= "2233";

run;

I want to import ths file called myfile.sasbat.  In this case what would the dbms be called or is there another way to import a file with the .sasbat file extension?

8 REPLIES 8
Mit
Calcite | Level 5 Mit
Calcite | Level 5

You don't need to import a sas data.
If your library is defined ok then you can open the data directly. Just check if the libname is successful.

Patrick
Opal | Level 21

As Mit wrote: The data is already stored as a SAS file so you need only to define a libname to access it within your SAS program, e.g:

libname mylib '' '//gaserver';

proc print data=mylib.myfile;

run;

dnuti
Calcite | Level 5

I have a related question that isn't answered yet.

I also have a .sasbat file.  I want to use proc import so that I don't have to list the near hundred variables in an input statement.  Is there no way to get around this?

LinusH
Tourmaline | Level 20

sasbat is not a common file suffix that I'm aware of. What file type is it?

What does it look like when opened in Notepad/vi?

Data never sleeps
dnuti
Calcite | Level 5

It cannot be opened in anything but SAS.  Otherwise it's giberish.  Not an original file but I don't have access to an original file.

Kurt_Bremser
Super User

Rename it to .sas7bdat, put it into a location where you have assigned a libname, and see if it is a valid SAS dataset. If not, discard.

dnuti
Calcite | Level 5

It's a valid dataset. 

How do I get around listing each variable name?

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1365 views
  • 0 likes
  • 6 in conversation