you cannot call G65 without Pxxxx. And the value of the variable assigned in G65 is passed in the local variable of the subprogram that it call. It does not affect the value of the main program local variable. There is a set of local variable for each level of programing up to three level, i think.
1st level is the main
2nd level is a sub called by the main
3rd level is a sub called by the second level.
But why it is so important to define your variable in one line ??
this should work:
IF [#100 EQ 1] GOTO 10
IF [#100 EQ 2] GOTO 20
IF [#100 EQ 3] GOTO 30
N40 START OF CUTTING PATH