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 ?
/* example log */
11 proc sort data=source.flatfiles;
12 by nbr_obs;
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 */
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.
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: