The easiest solution here is to (technically) create 10 experimental groups (codes) in a random generator question and then recode 1..7 to group A and 8..10 to group B.
if (value('RG01') <= 7) {
put('RG02_01', 1);
} else {
put('RG02_01', 2);
}
For the above code, you need a random generator RG01 and an "internal variables" question RG02 with one variable RG02_01.