The SCAN function on a VARCHAR type variable might return incorrect results


When you use the SCAN function on a VARCHAR type variable in a SAS® Cloud Analytic Services (CAS) table, incorrect results might be returned.

This problem can occur when the count argument for the SCAN function contains a value that is greater than the number of words in the string that is being scanned.

To circumvent the problem, use the COUNTW function to determine the number of words in the string and verify that the value for the count argument does not exceed the number of words in the string.