Hello,
a few days ago we tried to do the same thing and only for a few procedures the APPLCOMPAT had not changed (e.g. the SYSIBMADM.CREATE_WRAPPED).
We opened a case with IBM and here is the solution that worked
In order to solve this, you can run the ALTER PROCEDURE APPLCOMPAT, without the REGENERATE option. Here is the explanation given by development in a similar case (in that case the example was for M500, but it's the same for M503):
.
According to developer, there are 2 APPLCOMPAT values for DDL/Native SQL PL Proc. There is one that's tied to the
Procedure statement (CREATE PROCEDURE SYSTOOLS.REGSP...). And there is another one that is stored in SYSPACKAGE for
the procedure itself.
.
The one that is tied to the create procedure statement is the one recorded in SYSENVIRONMENT and it governs/limit
what the statement can be and what options can be specified. For example, if the APPLCOMPAT value for the CREATE
statement is only at M500, it cannot have options that is higher than M500.
.
The APPLCOMPAT that is recorded in SYSPACKAGE is tied to the procedure option APPLCOMPAT that is specified in the
body itself.
...
The cheapest and most simple way to correct an incorrect/outdated value on column APPLCOMPAT in SYSPACKAGE it is to
drop and recreate the procedure after they rebind the tep2 job to M500+. This way, both the environment and the
procedure will pick up the M500.
.
If dropping and recreate is not an option, then the way to fix it is to run:
.
- ALTER PROCEDURE REGENERATE USING APPLICATION COMPATIBILITY V12R1M500 statement. This will fix the environment
APPLCOMPAT value in SYSENVIRONMENT.
.
- then run an ALTER PROCEDURE APPLCOMPAT V12R1M500 statement. This will update the SYSPACKAGE and SYSPACKSTMT value
to V12R1M500
.
So the ALTER PROCEDURE REGENERATE USING APPLICATION COMPATIBILITY will update the APPLCOMPAT in SYSENVIRONMENT, but to update the APPLCOMPAT which figures in SYSPACKAGE you will sometimes need to perform an ALTER PROCEDURE with just APPLCOMPAT Keyword as it is detailed by development on the above update.
I know that we were looking into possibly updating the documentation to better reference this behaviour - that in order to "update" the value which appears on syspackage it could be necessary to run, besides the ALTER PROCEDURE REGENERATE USING APPLICATION COMPATIBILITY, an ALTER PROCEDURE APPLCOMPAT).