CL Command Reference - CHGMOD
CL Command List > CHGMOD Reference
Description:
The Change Module (CHGMOD) command changes the attributes of a module object without requiring the module to be recompiled.
Restrictions:
. You must have use (*USE) authority to the library where the module is located.
. You must have *USE and object management (*OBJMGT) authorities to the module to be changed.
. You must have *USE, add (*ADD), and delete (*DLT) authorities to the library in order to change the optimization attribute, the performance collection attribute, the profiling data attribute, or to force module re-creation.
. Modules in library QSYS cannot be changed.
Examples:
Example 1: Optimizing for Maximum Performance
CHGMOD MODULE(XYZ/PERFMOD) OPTIMIZE(40)
This command optimizes module PERFMOD in library XYZ to ensure optimum performance.
Example 2: Removing All Observability
CHGMOD MODULE(XYZ/NOOBSERV) RMVOBS(*ALL)
This command removes all observability from module NOOBSERV in library XYZ. It can not be re-created, and can not be debugged when it is included in a program or service program object.
Example 3: Enabling Collection of Profiling Data
CHGMOD MODULE(XYZ/PROFMOD) OPTIMIZE(30) PRFDTA(*COL)
This command enables module PROFMOD in library XYZ to collect profiling data when it is included in a program or service program object. The optimization level must be 30 or greater to enable a module to collect profiling data.