Hi,
I'm creating a second dataset using the SUBSTR function to keep all the data I need based on variables values.
For the variable DocClause, I have two different values I would like to keep in the dataset I am creating, "MR" and "MR14".
The code below only keeps the value "MR14" on the created dataset.
Is there a way to keep "MR14" and "MR" in my new dataset using the SUBSTR function?
DATA MEMOIRE.CDS_BBB_US_MR;
SET MEMOIRE.CDS_2001_2015;
IF SUBSTR(ImpliedRating,2,3)="BBB";
IF SUBSTR(Country,2,13)="United States";
IF SUBSTR(DocClause,2,2)="MR";
IF SUBSTR(DocClause,2,4)="MR14";
IF SUBSTR(Sector,2,10)="Government" THEN delete;
RUN;
Thank you
... View more