In addition to the for loop variable, the escape characters of batch variables should also be used in pairs, just like the brackets of four mathematical operations.
Call set b=%%a:~0, %c%%%
As far as your example is concerned, the innermost pair of single% is equivalent to brackets in four operations, the outermost pair of double% is equivalent to brackets, and the other 3% is equivalent to braces.