Deleting a Record in a Data Set

The cstutildeletemetadatarecords macro deletes records based on the records specified by the _cstDSIfClause parameter.
CAUTION:
Ensure that the WHERE clause retrieves the correct records to delete.
It is highly recommended that this operation initially be performed in test mode. For more information, see Test Mode.
In this example, the two rows of data added from the previous examples are deleted from the newstudy.source_values data set using the same WHERE clause:
*********************
*  Delete a record  *
*********************;

%cstutildeletemetadatarecords(
        _cstStd=CDISC-SDTM,
        _cstStdVer=3.1.3,
        _cstDS=newstudy.source_values,
        _cstDSIfClause=(table='EG' and value='QTC') or (table='IE' and value='INCL25'),
        _cstTestMode=n);
Here is the modified newstudy.source_values data set, which shows that the two rows have been deleted and the record count is reduced from 30 to 28:
modified newstudy.source_values data set
Here is the modified work._cstresults data set:
modified work._cstresults data set
Here is the updated transaction log data set:
updated transaction log data set