The simplest solution would be to get rid of this statement:
IF SUBSTR(DocClause,2,4)="MR14" ;
The condition relating to "MR" would already include all of the "MR14" cases.
It's important to note that the IF conditions operate as if the word AND were joining them. For an observation to make it all the way through into the final data set, it must satisfy all of the IF statements. If it makes sense, you can join multiple conditions using the word OR.
... View more