BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
vfarmak
Quartz | Level 8

Dear SAS Communities,

 

I am facing the below problem: when I try to query the Dictionary.Tables, error messages appear that denotes mistakes made either in ETL flows or in tables in general.

Sometimes, if the table is located in a registered library, I can perform from SAS Data Integration Studio the Update metadata action and the problem is fixed.

 

What should I in case the errors relate to the WORK library?

 

I will give you an example of the error log:

 

30         PROC SQL;
31         CREATE TABLE TABLE_INFO AS
32         SELECT 	CATX(".", t1.LIBNAME, t1.MEMNAME) AS TABLE_NAME
33         	, t1.libname
34         	, t1.memname
35         	, t1.nobs as number_of_lines
36         	, "POLICY_MEDI_AS400_INV" as Target_Table
37         FROM 	DICTIONARY.TABLES t1 INNER JOIN
38         		WORK.POLICY_MEDI_AS400_INV t2 ON t1.MEMNAME = t2.Table_Name;
ERROR: File WORK.EXPENSES_APPEND.DATA does not exist.
ERROR: File WORK.W63JIK64.DATA does not exist.
ERROR: File WORK.W6ENSJCK.DATA does not exist.
ERROR: File WORK.W6ENRHRZ.DATA does not exist.

Best Regards,

Vassileios

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Use of a DICTIONARY table in SQL causes a live scan of the requested objects. In the case of DICTIONARY.TABLES, SAS SQL does a directory listing of all assigned libraries, searching for *.sas7bdat, and then scans all found files for their metadata. While doing that, it converts all names to lowercase, so if you have a file

Expenses_append.sas7bdat

in your WORK, the file is found, but then SAS tries to read from

expenses_append.sas7bdat

and issues the message

ERROR: File WORK.EXPENSES_APPEND.DATA does not exist.

Is there anything in your code where you create stuff in WORK using file copy mechanisms or similar, bypassing the usual methods for creating datasets?

 

If this is not the case, your issue looks very much like something that requires opening a track with SAS Technical Support.

View solution in original post

6 REPLIES 6
Tom
Super User Tom
Super User

Why would a WORK dataset not exist?

vfarmak
Quartz | Level 8

In the work library are stored usually tables that are stored temporarily in a SAS session.

The problem is that I cannot find the tables in the WORK library (because they do not exist) and I need to find a way to search these tables in the metadata server (if they exist, so as to delete them).

 

 

mkeintz
PROC Star

@vfarmak wrote:

In the work library are stored usually tables that are stored temporarily in a SAS session.

The problem is that I cannot find the tables in the WORK library (because they do not exist) and I need to find a way to search these tables in the metadata server (if they exist, so as to delete them).


 

But the real question is why does the metadata server (i.e. the dictionary feature of PROC SQL) think these dataset files exist, when in fact they don't?   Does this happen regularly?

 

Question: is there a possibility that the directory assigned to the work library also in use by another SAS process?

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
vfarmak
Quartz | Level 8
It is a dataset and not a view.
I tried to Query the Dictionary.Tables to find out about these types of messages (that include the error).
I searched and found out the PROC METALIB, but I do not know if I can list the problematic tables.
Kurt_Bremser
Super User

Use of a DICTIONARY table in SQL causes a live scan of the requested objects. In the case of DICTIONARY.TABLES, SAS SQL does a directory listing of all assigned libraries, searching for *.sas7bdat, and then scans all found files for their metadata. While doing that, it converts all names to lowercase, so if you have a file

Expenses_append.sas7bdat

in your WORK, the file is found, but then SAS tries to read from

expenses_append.sas7bdat

and issues the message

ERROR: File WORK.EXPENSES_APPEND.DATA does not exist.

Is there anything in your code where you create stuff in WORK using file copy mechanisms or similar, bypassing the usual methods for creating datasets?

 

If this is not the case, your issue looks very much like something that requires opening a track with SAS Technical Support.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 657 views
  • 1 like
  • 4 in conversation