If you don't want to use global variables, use the include files to define functions and only include the files once, probably at the beginning of your main file. Then you can call the user defined functions with parameters. Something like this:
Main.jsl
--------
include("sub1.jsl");
include("sub2.jsl");
calculator(42);
reportWriter("report title");
sub1.jsl
-------
reportWriter = function({title},{i,j,k}, // i,j,k are local variable examples
write(title,"this is my report")
);
sub2.jsl
----
calculator = function({thresholdNumber},{x,y,z},
return(sqrt(thresholdNumber));
)
Craige