BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
EG doesn't allow to create a dataset if it's already registered in metadata ,
like sorting a dataset , updating via a datastep , merging via a datastep , but it does allow it in other cases like a proc sql create table .
In some cases there is a simple workaround by first deleting it , but that's not an option for a sort ... There I would need to sort it to a work table , delete or empty the table and then append the work table ....

Is there an option to force this to be allowed ?

thx,
Wim

/* example log */
11 proc sort data=source.flatfiles;
12 by nbr_obs;
13 run;

ERROR: The member name SOURCE.FLATFILES already exists in metadata.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
/* end log */
2 REPLIES 2
ChrisHemedinger
Community Manager
Wim,

In this case it's the behavior of the META engine that is getting in your way. The META engine is the library engine that looks into metadata for library and table definitions.

Prior to SAS 9.1.3 SP 4, the META engine really wants to update table metadata when you create tables. However, it requires that you first drop tables of the same name before creating new ones. When you do that, the table object in metadata winds up being a new, different table object (even if the contents are the same).

With Service Pack 4 of SAS, the META engine changes behavior so that it does not update metadata. If you want to add tables to the library, you should assign the library with the METAOUT=DATA option, and then sync the library contents in metadata by using PROC METALIB (added with Service Pack 3 of SAS).

EG 4.1 facilitates the METAOUT=DATA option with its library definition dialogs in the Tools->SAS Enterprise Guide Explorer. You will still need to run the PROC METALIB step yourself to sync the table definition in metadata.

More information about PROC METALIB:
http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/omd_ref_8969.pdf

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
ChrisHemedinger
Community Manager
As a reply to my own reply, I'd like to advertise the availability of the Update Library Metadata task, which guides you through using PROC METALIB from with Enterprise Guide. You can download it from here:

http://www.sas.com/apps/demosdownloads/setupcat.jsp?cat=SAS+Enterprise+Guide

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1003 views
  • 0 likes
  • 2 in conversation