PERFORM subr(prog) [IF FOUND] [parameter_list].
A variant of the external subroutine call that is not
allowed in classes. The statement
PERFORM calls the statically specified subroutine
subr of a statically specified program
The existence of the specified program and subroutine is not check by the syntax check. Only the
check registers any nonexistent programs or subroutines as errors by default. If the addition
IF FOUNDis specified, the extended program check also skips the check.
If the specified subroutine or program does not exist at runtime, a handleable exception of the class
CX_SY_DYN_CALL_ILLEGAL_FORM or CX_SY_PROGRAM_NOT_FOUND is raised by default. If the addition
IF FOUNDis specified, the statement
In this variant, the program name
progis specified directly in parentheses. Since parentheses in operand positions indicate a dynamic specification in all other cases, this form of the name is obsolete. Specify it with the addition
- External calls of subroutines are obsolete in any case. Instead of subroutines, methods and function modules can be used as explicit functional interfaces of a program.
Furthermore, external calls of subroutines are critical, since it cannot usually be statically determined to which program groups the master program is assigned.