Deleting a Data Set

Although it is not a new macro, the %CSTUTIL_DELETEDATASET macro has been updated to write to the transaction log data set. As a result, it can be used as a metadata management macro. With this new capability, any data set that is deleted can be recorded in the transaction log data set if the _cstLogging parameter is set to 1. The default is not to write to the transaction log data set.
The following example deletes the newstudy.source_values data set that was used in these examples:
*************************
*  Delete the data set  *
*************************;

%cstutil_deletedataset(
        _cstDataSetName=newstudy.source_values,
        _cstLogging=1);
After running the macro, the directory no longer contains the data set.
This macro does not write to the work._cstresults data set. Messages are written directly to the SAS log file:[CSTLOGMESSAGE.CSTUTIL_DELETEDATASET] NOTE: newstudy.source_values successfully deleted.
The following display shows the updated transaction log data set:
Updated Transaction Log Data Set
updated transaction log data set
Note: In the image, Name of standard and Standard version are not populated. The %CSTUTIL_DELETEDATASET macro is an older SAS Clinical Standard Toolkit macro that does not require those parameter values for any data lookups. However, the values for the file path and the data set name are listed in the transaction log data set.