Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Before an upgrade, rollswap, or just for good hygiene, its good to know which CL commands have had their command defaults changed. Here's an approach that works all the way back to IBM i 7.2.
--
-- Which CL commands have had their parameter defaults changed?
-- (On IBM i 7.3 and higher)
--
with libs (lib) as (
select objname
from table (
qsys2.OBJECT_STATISTICS('*ALLAVL', '*LIB')
)
)
select lib, objname as cmd, cmds.apar_id, cmds.*
from libs, table (
qsys2.OBJECT_STATISTICS(lib, '*CMD')
) as cmds
where cmds.apar_id = 'CHGDFT';
stop;
--
-- Which CL commands have had their parameter defaults changed?
-- (On IBM i 7.2 only... if you have SF99702 720 DB2 for IBM i - level 27)
--
with libs (lib) as (
select objname
from table (
qsys2.OBJECT_STATISTICS('*ALLAVL', '*LIB')
)
)
select lib, objname as cmd, cmds.sql_object_type, cmds.*
from libs, table (
qsys2.OBJECT_STATISTICS(lib, '*CMD')
) as cmds
where cmds.sql_object_type = 'CHGDFT';
@MarinaSchwenk
Copy link

MarinaSchwenk commented Jun 7, 2021

Thank you Scott! this is very helpful!!

Loading

@fplazavi
Copy link

fplazavi commented Jun 29, 2021

This is Important when you working on a new system ... ( Preparing for Version Upgrade ...)

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment