0
votes

I have some data called "abc_partner_data" within a permanent library called "Input_SAS", within SAS. I want to import the data into my SAS session so that I can start analysing the data. The code I have used to do this is below:

data abc_partner_data;
set Input_SAS.abc_partner_data*;
run;

However I keep getting two errors. Firstly SAS states "Libref abc_partner_data exceeds 8 characters". So can I change the Libref name to any name I want?

Also SAS states "the File WORK.SDP_POLICY_CUST_DATA does not exist". I am not sure how to solve this problem. Any suggestions would be useful!

2
to start with, what format is your data in? - DCR
@DCR It was originally an Excel CSV - Jed
You cannot have a permanent SAS library named Input_SAS as the maximum length for a libref is 8 characters. - Tom

2 Answers

1
votes
  1. open sas click on library icon
  2. right click in the explorer window and create a library, specify enable at start up
  3. left click your new library
  4. left click 'file' on the toolbar in sas
  5. click on import data
0
votes

Change the libname statement which defines the library Input_SAS and change it to 8 characters name. for example InputSAS

Then edit the code to be like:

libname InputSAS '<libname_path>';
data abc_partner_data;
set InputSAS.abc_partner_data*;
run;

Note: the libname statement assumes it is a SAS Base library please check the libname documentation

The dataset work.abc_partner_data will be existed after this code finishes successfully