You have to use a global because you cannot access a parameter or local variable from another sequence, whether it is in the main or another sub suequence. That is why they are called locals and gloabals. A parameter is always local. Or you could send the parameter from the main as a parameter to the sub sequence. You have to define a variable in the parameter section of the sub sequence in order to pass the main parameter to the sub sequence. By reference means that the storage location (address) of the variable is passed, and if the sub sequence changes the value then the main will see that change. By value means that the value of the variable is passed, the sub sequence creates a different storage location for the variable, and if the sub sequence changes the
value then it changes at the newly created location. The main does not see the change, it sees the value that was originally passed (at original address, not newly created address). It is your choice depending on what you want done.