That's a lot of work you've done in that batch file. Did you know, that for example putting this line in a RSF file:
Key: $(VALUE)
and add this to the makerom command:
-DVALUE="SomeValue"
Makerom will read that line as:
Key: SomeValue
Test1: CTR-$(A)-$(CODE)
Test2:
- Item1
- Item$(B)...