I don't understand why the INDEX function does not work the way it is supposed to. My string that is being searched is a list of grades a given program is offered to (prgoffered) such as "789" or "7" etc. (I have it saved as a character var). And then for each observation I am checking if a given student is in a grade that offers the program. Again, it is saved as a character var. My code is as follows: servedgr=indexc(prgoffered,grade); but when I print the output I see that index put a servedgr=2 when my prgoffered="7" and grade="2". Why isn't my servedgr=0 ????