This statement scans a string dividing into 2 substrings, the first one from the beginning up to the first comma [,] found, the second one from that point up to the first "M" found.
In my opinion the $ sign is incorrect and should be a %.
The Scan instruction is quite complex to understand: the best is that you look into the on-line help >> Library Reference >> Formatting and I/O library where Scan function is described in full detail.