splitting multiple values in one variable to several variables

Hi Folks,

I am a long time out of the spss loop. I have only recently returned to it after a decade+ of non-use. Feeling very rusty.
I am hoping someone here can help me with the following:

Currently, I have a column called ''Prog_groups''. This column contains character/string data in it that is separated by commas.
I have found a way to split "Prog_groups" into an appropriate number of sub-columns (prg1 to prg8) - but this requires that I know the number of columns to create.
I'd like something a little more dynamic, like counting the number of separators (- in my case commas), then dynamically creating the necessary sub-columns.
I have a couple of variables like this that I would like to do this to. So I would prefer to do this dynamically, because I may need to pull data from this source regularly for testing purposes and having the spss syntax or macro do the work would be very useful.

I have managed to dynamically determine the upper end of columns I need for this what I need by using an aggregate command and stuffing that result into a field called "prgsmax". But, I am flummoxed at how to use that "prgsmax" value (in this case, the number is 8) to become the upper end of something like:

string proggrp_1 to proggrp_8

So, I guess I am wondering if I should stuff that prgsmax data into a field or not or somehow pull that result from the spss output somehow and then use it for the rest of the issue?

Is is necessary to use the macro language or python (just picked up a book on this) to do this? I am a complete newbi at the either (macros, python).
Any help deeply appreciated.