I have used execute to dynamically create variables in a pipeline. The variables however are "forgotten" not long after, often in the same program.
A work around this is just to use the variable in any capacity just after creation, e.g. print, variable. Then it knows about them later on.
This isn't a problem in IDL so probably needs to be fixed at somepoint.