Use the ::ROUTINE directive to create a named routine within a program. The ::ROUTINE directive starts the named routine and another directive (or the end of the program) ends the routine.
The ::ROUTINE directive is useful for defining lower-level routines that are called by several methods. These methods might be in unrelated classes or in different applications. Use ::ROUTINE when you have some useful utility that you don't want to surface as a method.
The ::ROUTINE directive includes a PUBLIC option for making the routine available to programs outside its containing REXX program, and the outside program must reference the routine by using a ::REQUIRES directive.
Only one ::ROUTINE directive can appear for any routine name within a program.