Alternatively, you could try to suppress the portion of the string which is not the actual range by prxchange as below and use the remaining portion for comparison
The input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) will return the numeric portion i.e. the last 6 digits which is converted to numeric value by input function
SERIAL_NBR =: 'AB123X67' and not (input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) <= SERIAL_NBR <= input(prxchange('s/^\w{2}\d{3}\w{1}//',-1,char),best.) )
... View more