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);
The following display shows 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
modified newstudy.source_values data set
The following display shows the modified work._cstresults data set:
Modified work._cstresults Data Set
modified work._cstresults data set
The following display shows the updated transaction log data set:
Updated Transaction Log Data Set
updated transaction log data set