*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | EXSR | | Subroutine name | | | *---------*---------------*-----------------*----------------*---------------*
The EXSR operation causes the RPG/400 subroutine named in factor 2 to be processed. The subroutine name must be a unique symbolic name and must appear as factor 1 of a BEGSR operation. The EXSR operation can appear anywhere in the calculation specifications. Whenever it appears, the subroutine that is named is processed. After operations in the subroutine are processed, the statement following the EXSR operation is processed except when a GOTO within the subroutine is given to a label outside the subroutine or when the subroutine is an exception/error subroutine with an entry in factor 2 of the ENDSR operation.
*PSSR used in factor 2 specifies that the program exception/error subroutine is to be processed. *INZSR used in factor 2 specifies that the program initialization subroutine is to be processed.
See Coding Subroutines for more information.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.