Colin,

First I would encourage you to not use global variables but if you do so it is better to initialize them and not expect initialization by default. There even is - although obsolete - a command named CHAIN that passes all global (integer) variables from the starting program to the chained-to program.