When an SQL procedure, trigger, or function is created, DB2 UDB for iSeries generates a C program object with embedded SQL to implement the business logic described in the procedural SQL object. This C program implementation is transparent to the programmer because DB2 UDB takes care of the program creation and compilation.
Recently, a defect was discovered in V5R2 and V5R3 in which DB2 UDB for iSeries in certain cases was not using the optimization level parameter during compilation of the generated C program objects. Thus, these program objects could be missing out on compiler optimizations that could provide a small performance boost to SQL procedures, triggers, and functions.
To determine if any of your SQL procedural objects fall into this category, you can use the DSPPGM or DSPSRVPGM CL command to review the optimization level setting on the module-level detail screen. If the optimization level is set to *NONE, then your SQL procedural objects are affected by this defect.
There are two options available for remedying this situation. If you have the source code for the SQL procedure, trigger, or function, you can apply the following PTFs to your server.
- V5R2 PTF 5722SS1 SI18369
- V5R3 PTF 5722SS1 SI18358
After applying the PTFs, you can force the re-creations of the associated C program objects by dropping and re-creating your SQL procedure, trigger, or function.
If the source code is not available or you would prefer to change the optimization on an entire library of SQL procedural objects, then follow these steps to just change the optimization level.
1. Place this CL source in QGPL/QCLSRC.
DCL &LIB TYPE(*CHAR) LEN(10)
QSYS/CHGPGM PGM(&LIB/*ALL) OPTIMIZE(40)
QSYS/CHGSRVPGM SRVPGM(&LIB/*ALL) OPTIMIZE(40)
ENDCHGPGM: ENDPGM
2. Create the CL program.
3. Invoke the CL program, passing the name of a library containing SQL procedure, trigger, or function.
Kent Milligan is a DB2 UDB Technology Specialist on IBM's eServer Solutions Enablement team. He spent the first seven years at IBM as a member of the DB2 development team in Rochester. He can be reached at
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online