You are in: RPG Cafe > New in 2016: ON-EXIT opcode
Short URL: http://ibm.biz/RPG_ON_EXIT_Section
RPG Cafe: ON-EXIT section in a procedure
Enhancement for 7.2 and 7.3: The ON-EXIT section with code that is run whenever a procedure ends
The ILE RPG compiler is enhanced with a new ON-EXIT opcode which begins the "ON-EXIT" section containing code to be run whenever a procedure ends, either normally or abnormally.
If you have code that you always want to run when your procedure ends, put that code in the ON-EXIT section. https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzasd/zzonexit.htm
- ILE RPG runtime: SI62949
- ILE RPG compiler: SI62955
- ILE RPG runtime: SI62950
- ILE RPG compiler: SI62957
- ILE RPG compiler, TGTRLS(V7R3M0): SI62965
The PTFs are also available with Db2 for i Fixpacks. DB2 PTF group SF99702 (Level 16 or higher) for 7.2 and DB2 PTF group SF99703 Level 4 (or higher) for 7.3. See Technology Updates/page/Db2 for IBM i 2017 Group PTF Schedule.
RDi supports ON-EXIT starting in version 9.6.
11 December 2019