Deleting a Column in a Data Set

The %CSTUTILDELETEDSCOLUMN macro deletes an existing column from a data set.
In this example, the macro deletes the comment2 column (which was created in the previous example) in the newstudy.source_values data set. The _cstMustBeEmpty parameter is set to N, which specifies that the macro should delete the column if values are present.
*********************
*  Delete a column  *
*********************;

%cstutildeletedscolumn(
        _cstStd=CDISC-SDTM,
        _cstStdVer=3.1.3,
        _cstDS=newstudy.source_values,
        _cstColumn=comment2,
        _cstMustBeEmpty=n,
        _cstTestMode=n);
The following display shows the modified columns in the newstudy.source_values data set. The comment2 column has been removed and the column count is reduced to 21.
Modified Columns in the newstudy.source_values Data Set
modified columns in the 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