Generate a SUBROUTINE from ILF
APPX 5.2 added four runtime utilities for building a SUBROUTINE in an application. Keep the create, write and close calls in the same SUBPROCESS family.
Build the process
- Call .UTIL SUBR CREATE to create an empty subroutine.
- Call .UTIL SUBR WRITE ILF for each statement. Pass the operands required by that statement.
- Call .UTIL SUBR CLOSE to close and compile the process. Check for compilation errors before invoking it.
- To remove the generated design, call .UTIL SUBR DELETE. Otherwise it stays in your application.