What does your if substr() mean? Do you want to apply AND or OR logic between the values in the series?
I don't know of a way to do this in a single statement.
My suggestion is to create a new array coupled with a variable series, then loop through both arrays assigning values to the new array. Or, you could couple the existing variable series to an array which would make it unnecessary to assign new values, just do the if thing.
use an ARRAY statement to define the list of character variables. One of the CATx functions could return the entire array as a single string. The FIND function can do the searching.
The CAT can appear within the FIND like
found = find( cat( of arrayname(*)), '555' ) ;
Using the array statement allows unrelated columns to be concatenated.
If you only want a numbered range of variables, then you don't need the array statement and the code reduces to
found = find( cat( of blah1 - blah24), '555');
it isn't SUBSTR but I think CAT and FIND do what your message seemed to want.