September 2019
Beginner to intermediate
346 pages
7h 35m
English
Another set of useful functions for finding information in a string are the variations of the Index function. Let's look at the following example to understand how it works:
Data Index_Demo; String_x = 'Indexit(FINDIT)'; String_y = 'findit'; Not_Found = Index(String_x, String_y); Found=Index(String_x,upcase(String_y));Run;
The following is the resultant output:

The Index function searches for the first occurrence of the character string as a substring. In this example, we are trying to find the starting position of the FINDIT string within the String_x variable. We used the String_x variable as the first argument ...
Read now
Unlock full access