For those who may not have followed what Ksharp has done here:
1) The COUNT of 1 in the SCAN function means that we want to get the FIRST word from the string x. Since COUNT is POSITIVE, SCAN scans words from LEFT to RIGHT within the string x.
2) kd is a "SAS Character Function" that retains only numeric values from a string. Similarly, ak is a SAS Character Function that retains only alphabetical values from a string.
So here, kd would give us e.g. 06257 for x2 in the second row.
Had ak been used for x2, it would've given us e.g. ELEVEN instead.
The result for x1 here is 06257-ELEVEN
Our lives are enriched by the people around us.