BookmarkSubscribeRSS Feed
chelsealutz
Fluorite | Level 6

Hi all,

 

So I know there have been a lot of threads about this issue, but none of the solutions listed seem to be working for me. I have tried:

 

data new;

set '\\***.gov\project\***_***_Store1\**\***\Surveys for ********\**** **\2015-2016 *\Deliverables\2016 04 deliverables\Analytic files\hcp_analyt.sas7bdat';

run;

 

and

 

libname work '\\***.gov\project\***_***_Store1\**\***\Surveys for ********\**** **\2015-2016 *\Deliverables\2016 04 deliverables\Analytic files\hcp_analyt.sas7bdat';

proc print data=work.'\\***.gov\project\***_***_Store1\**\***\Surveys for ********\**** **\2015-2016 *\Deliverables\2016 04 deliverables\Analytic files\hcp_analyt.sas7bdat';

run;

 

Both to no avail. I'm clearly missing something, and knowing me it's pretty obvious, but could someone please clear things up? Is it the length of my file name perhaps? The asterisks are actually words in my actual file, I just can't post the actual file. The spaces are actual spaces in my file name. The first code starts to work, but generates these errors:

 

..........

ERROR: The format REGION_RAKE was not found or could not be loaded.

ERROR: The format GENDER_RAKE was not found or could not be loaded........

(an error for each)

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.NEW may be incomplete. When this step was stopped there were 0

observations and 432 variables.

 

3 REPLIES 3
Shmuel
Garnet | Level 18

Try next code:

 

LIBNAME mydata '\\***.gov\project\***_***_Store1\**\***\Surveys for ********\**** **\2015-2016 *\Deliverables\2016 04 deliverables\Analytic files';   /* NOTE - without the SAS dataset name */

 

data want;

  set mydata.hcp_analyt;  /* NOTE: without suffix sas7bdat */

run;

 

As about format error messages - you need to recreate them or to assign a libname where the format cataloge exists.

In case the catalog is under same directory as "mydata" then just add:

  options fmtsearh= (mydata); before above code. 

Reeza
Super User

If you have custom formats applied to the dataset but don't have the formats any more you can use

 

options nofmterr; 

 

This will strip the format from the data.

 

LinusH
Tourmaline | Level 20
The syntax you are trying to use is the core of the SAS Language.
I sugest that you take the (free!) online programming class.
Data never sleeps

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
  • 11309 views
  • 0 likes
  • 4 in conversation