All Forums Analytics
karanberry 2 posts Joined 10/10
28 Feb 2011
Object already exists - Workaround to overwrite dataset in teradata


I use SAS quite often and all my programs conenct to the teradata sql server to get the data. However, some of the programs also create files in the server.

The problem occurs when we run the same program again and teradata gives an error that the 'object already exisits'. Currently we use the following snippet to remove those datasets before the relevant step executes.

%local check ;
%let check=%sysfunc(exist(.));
%if &check=1 %then %do;
proc datasets lib=(;
delete ;

However, this snippet works sometimes and doesn't work other times.

Is there any foolproof way of deleting the object? Better yet, is there any way of overwriting datasets in teradata? Like SAS does by default, when you run the same program again.


You must sign in to leave a comment.