The other thing about doing that way is that how to I do IF statements on the contents of that newly created variable?

One way I thought of is to create them, and then use another execute function to copy the status and phase variable to generic ones that the script can then do IF statements on.