Sorry, but you don't understand when FOR/NEXT has to be used:
Only in case you have something like:
*FOR %M1% = %TIME_SET%
*XDIM_MEMBERSET TIME=%M1%
...
*WHEN ...
*REC(EXPRESSION=..., TIME=TMVL(1,%M1%)) //To write data to the next month!
*ENDWHEN
If you don't need to write to another month then:
*XDIM_MEMBERSET TIME=%TIME_SET%
or even without this line (TIME scope will be set by %SELECTION%)
Vadim