DATA Step, Macro, Functions and more

How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

Reply
Frequent Contributor
Posts: 87

How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

[ Edited ]

Hi

 

I have created a libname XXXX and have saved a table Event_History_Main in it, using:

 

libname XXXX meta library="XXXX" metaout=data;

data XXXX.Event_History_Main;
	set work.Event_History_Main;
run;

 

but when I try to run this code

 

data Event_History;
	set XXXX.Event_History_MAIN;
run;

 

I get error:

 

 ERROR: Libname XXXX is not assigned.

 

How to resolve it?

Super User
Posts: 6,928

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

I see a reference to library XXXXj, which does not resemble XXXX.

Please post the log with all relevant statements & steps.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 87

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

Hi Kurt,
It was a typing mistake.
Super User
Posts: 6,928

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

Did that resolve your problem?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 87

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

It was a tying mistake on this forum but in SAS EG, I checked everything is correct.

 

I am still getting the same ERROR.

 

I don't know what i missed before the code:

 

data Event_History;
	set XXXX.Event_History_Main;
run;

May be some reference to Library or something... i don't know. I tried this also but failed...

 

/* Retrieve Saved Data from LibName - "XXXX" */
libname XXXX yy;

/* Retrieve Saved Data from LibName - "XXXX" */
data Event_History;
    set XXXX.Event_History_Main;
run;
Occasional Contributor
Posts: 8

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

I ahve tried to save it in my directory and it works !

 

libname xxxx "location you want to save"; 

 

But I am not sure about the metadata server location..

Super User
Posts: 6,928

Re: How to assign libname and resolve ERROR: Libname XXXX is not assigned ?

When you use libname meta, you are dependent on the attributes the library has in the SAS metadata definition. If it points to a place in the filesystem where your userID lacks the required permissions, you have problems.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 6 replies
  • 248 views
  • 0 likes
  • 3 in conversation