This is how the base explain prep guide explains INDEX and FIND.
I don't know about you but to me, the author seems to rewrite the same thing but in three separate sentences for INDEX and FIND respectively.
Both search specific string/substring from left to right, looking for first occurrence of the string/substring, if nothing is found return 0.
only difference I see is
INDEX is for string while
FIND is for subtring.
But the book never explains what the difference is between a string and a substring in this context.
using the example in the book
data work.datapool;
set cert.temp;
index = index(job,'word processing');
find = find(job,'word processing');
run;
proc print data=work.datapool;run;
the result is the same
so I am guessing in context "word processing" is both a string and a substring if I go by the prep guide explanation of the FIND and INDEX?
... View more