DATA Step, Macro, Functions and more

Having problem while creating dataset

Occasional Contributor
Posts: 6

Having problem while creating dataset

[ Edited ]

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


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;
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
Super User
Posts: 9,611

Re: Having problem while creating dataset

Posted in reply to Nikhil_1393

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 ......
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super Contributor
Posts: 478

Re: Having problem while creating dataset

Posted in reply to Nikhil_1393



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.

Super User
Super User
Posts: 7,860

Re: Having problem while creating dataset

Posted in reply to Nikhil_1393

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.

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation