Skip to content

Instantly share code, notes, and snippets.

@forstie
Created June 4, 2021 16:22
Show Gist options
  • Save forstie/8c52bc323599a1a4256587465e332611 to your computer and use it in GitHub Desktop.
Save forstie/8c52bc323599a1a4256587465e332611 to your computer and use it in GitHub Desktop.
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

Thank you Scott! this is very helpful!!

@fplazavi
Copy link

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

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