I'm using the split
command to split a variable which has multiple strings separated by a semicolon. I would also like to keep track of how many new string variables have been created as a consequence of splitting the original string variable and store it in a local macro.
So for example, if my initial data is something like:
State
PA;CA
MA
WA;CA;OR
And I use split State, p(;)
:
State State1 State2 State3
PA;CA PA CA
MA MA
WA;CA;OR WA CA OR
I would like to be able to find that it has created 3
new variables and store that value in a local macro.
Is there a way to do this?