05-05-2018 11:47 PM - last edited on 05-06-2018 01:28 AM by KurtBremser
INPUT ID $ 1-3 SBP 4-6 DBP 7-9 GENDER $ 10 AGE 11-12 WT 13-15;
After running this..The log window says..........
05-06-2018 01:51 AM
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 ......
05-06-2018 08:50 AM
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.
05-06-2018 11:50 AM
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.