Optimizing an object means looking at the compiled code, determining what can be done to make the run-time performance as fast as possible, and making the necessary changes. In general, the higher the optimizing request, the longer it takes to create an object. At run time, the highly optimized program or service program should run faster than the corresponding non-optimized program or service program.
Example:
This example shows you how to change the optimization level of module T1520IC4 from *FULL to *NONE to allow variables to be displayed and changed when the program is in debug mode. Once debug is complete, you can change the optimization level back to *FULL for improved run-time performance.
+--------------------------------------------------------------------------------+
| Display Module Information | |
Module . . . . . . . . . . . . : T1520IC1 | |
Library . . . . . . . . . . : MYLIB | |
Detail . . . . . . . . . . . . : *BASIC | |
Module attribute . . . . . . . : CLE | |
Module information: | |
Module creation date/time . . . . . . . . . . . . . . : 93/09/93 12:00:00| |
Source file . . . . . . . . . . . . . . . . . . . . . : QACSRC | |
Library . . . . . . . . . . . . . . . . . . . . . . : MYLIB | |
Source member . . . . . . . . . . . . . . . . . . . . : T1520IC1 | |
Source file change date/time . . . . . . . . . . . . : 93/08/18 13:31:40| |
Owner . . . . . . . . . . . . . . . . . . . . . . . . : SMITH | |
Coded character set identifier . . . . . . . . . . . : 65535 | |
Text description . . . . . . . . . . . . . . . . . . : | |
Creation data . . . . . . . . . . . . . . . . . . . . : *YES | |
Intermediate language data . . . . . . . . . . . . . : *NO | |
More... | |
Press Enter to continue. | |
F3=Exit F12=Cancel | +--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
| Display Module Information | |
Module . . . . . . . . . . . . : T1520IC4 | |
Library . . . . . . . . . . : MYLIB | |
Detail . . . . . . . . . . . . : *BASIC | |
Module attribute . . . . . . . : CLE | |
Sort sequence table . . . . . . . . . . . . . . . . . : *HEX | |
Language identifier . . . . . . . . . . . . . . . . . : *JOBRUN | |
Optimization level . . . . . . . . . . . . . . . . . : *NONE | |
Maximum optimization level . . . . . . . . . . . . . : *FULL | |
Debug data . . . . . . . . . . . . . . . . . . . . . : *YES | |
Compressed . . . . . . . . . . . . . . . . . . . . . : *NO | |
Program entry procedure name . . . . . . . . . . . . : _C_pep | |
Number of parameters . . . . . . . . . . . . . . . . : 0 255 | |
Module state . . . . . . . . . . . . . . . . . . . . : *USER | |
Module domain . . . . . . . . . . . . . . . . . . . . : *SYSTEM | |
Number of exported defined symbols . . . . . . . . . : 1 | |
Number of imported (unresolved) symbols . . . . . . . : 10 | |
Press Enter to continue. | |
More... | |
F3=Exit F12=Cancel | +--------------------------------------------------------------------------------+
CHGMOD MODULE(MYLIB/T1520IC4) OPTIMIZE(*NONE)
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.