BookmarkSubscribeRSS Feed
Nikhil_1393
Calcite | Level 5

DATA "E:\Essentials\Information.";
INPUT ID $ 1-3 SBP 4-6 DBP 7-9 GENDER $ 10 AGE 11-12 WT 13-15;
DATALINES;
001120 80M15115
002130 70F25180
003140100M89170
004120 80F30150
005125 80F20110
;
RUN;
PROC MEANS;
RUN;

 

After running this..The log window says..........

 

ERROR: The value E:\ESSENTIALS\INFORMATION. is not a valid SAS name.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
81 ;
 
 
82 RUN;
83 PROC MEANS;
ERROR: There is not a default input data set (_LAST_ is _NULL_).
84 RUN;
 
I cannot figure out why this is happening.....Please help me out
3 REPLIES 3
Kurt_Bremser
Super User

Your problem is not in creating a library, but in creating a dataset, so I corrected the subject line.

 

You need to supply a valid dataset name in a data statement. The dataset name cane either be a single-level name (max. 32 characters, letters, digits, underlines, must start with a letter or underline), or a two-level name with a library and dataset name.

The library name is assigned with a libname statement and has a maximum length of 8.

 

You might want to do this:

libname mylib "E:\Essentials\Information";

data mylib.mydataset;
input ......
SuryaKiran
Meteorite | Level 14

Hi,

 

DATA statement is used for creating SAS Datasets. Syntax for DATA statement is DATA <libref.>SAS-data-set; libref is SAS library reference which is defined by LIBNAME statement syntax LIBNAME libref 'your-SAS-data-library'; You can give your physical path in quotes and define a library and later reference the library.(Note: Rules for creating SAS library depends on operating system, but advised to have 8 characters). If you miss the libref then SAS will create a temporary table in WORK library.

Thanks,
Suryakiran
Tom
Super User Tom
Super User

Assuming that you are trying to reference the dataset by its physical name then I see two possible issues with that name.

1) You have used an invalid extension for the filename. Either use .sas7bdat or do not add any extension.

data "E:\Essentials\Information";
data "E:\Essentials\Information.sas7bdat";

2) The path is wrong. Either E:\Essentials does not exist. Or E:\Essentials\Information is a directory and cannot also be used for a filename.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1613 views
  • 0 likes
  • 4 in conversation