An elegant, relatively fast approach would use two hash tables. In one DATA step:
Create a hash table from B that uses TICKER as the key and OTHER_STUFF as the data.
Create another hash table from B that uses SECOND_TICKER as the key and OTHER_STUFF as the data.
Read in an observation from data set A, and compare to the hash tables. More specifically, see if there's a match in hash table #1. If so, read in OTHER_STUFF. If not, see if there is a match in hash table #2. If so, read in OTHER_STUFF.
... View more