The SUBROUTINE package is another batch file that is called through the CALL command:
CALL subroutineName Param1 Param2
A routine can be placed in the same calling code file. This indicates that a colon is preceded by its name:
CALL :SubroutineInThisFile Param1 Param2 . . . . . . . . . . . . EXIT /B :SubroutineInThisFile . . . EXIT /B :AnotherSubroutine . . . EXIT /B
The EXIT / B command (NOT EXIT only) is used to indicate the end of a routine in the same file; this should also be done for the main program.
If another batch file is called without the CALL command, as in your example, then the network result is similar to "GOTO for another file": when the completed file ends, the process ends at this point. I used to call "Overlay" (instead of "subroutine") a batch file called this way.
source share