06-10-2014 05:39 PM
I'm trying to compare different values in different columns by another columns.
Let me explain:
Through the KEY variable, I want the sas code take the first COD_PEÇA and scan in CD_ITEM variable flag as "S" the variable FLAG whenever it finds a repeated (whatever put the "S" in the first line or last as long as put once)
By KEY ="X"
FIRST LINE -> first COD_PECA = "a" and CD_ITEM = " " THEN flag = "N";
LAST LINE -> first COD_PECA = "a" and CD_ITEM = "a" THEN flag = "S";