A fix is available
APAR status
Closed as program error.
Error description
The following C program receives a C compiler error after it is precompiled with the DB2 Precompiler because the precompiler inserts the #include <string.h> directive after the #pragma nosequence directive, and the <string.h> file already contains a typedef for size_t: #pragma nosequence typedef unsigned int size_t; ... Error received: EDC0289 30 The typedef name size_t cannot be redefined.
Local fix
Change to a conditional typedef as follows: #ifndef __size_t typedef unsigned int size_t; #define __size_t 1 #endif
Problem summary
**************************************************************** * USERS AFFECTED: Users of the DB2 V9.1 for z/OS Precompiler * * for the C host language. * **************************************************************** * PROBLEM DESCRIPTION: Inclusion of <string.h> by the DB2 V9.1 * * for z/OS Precompiler may result in C * * compile errors. * **************************************************************** * RECOMMENDATION: * **************************************************************** The DB2 V9.1 Precompiler includes the <string.h> header file in the generated C source program at the beginning, after any #pragma or #includes of the application, and before all other C source code. If the application program contains an unconditional typedef for a type already defined by <string.h>, then a compile error will occur. For example, the following C program receives a compile error after it is precompiled: #pragma nosequence typedef unsigned int size_t; EXEC SQL INCLUDE SQLCA; extern main() { EXEC SQL COMMIT; } Compile error: CCN3334 Identifier size_t has already been defined or EDC0289 The typedef name size_t cannot be redefined. The cause of the compile error is that size_t is already defined in <string.h>. Additional keywords: MSGCCN3334 MSGEDC0289
Problem conclusion
The DB2 Precompiler is modified so that the inclusion of <string.h> into the generated C source program is removed, thus preventing the C compile error described above.
Temporary fix
Comments
APAR Information
APAR number
PK69517
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-07-24
Closed date
2008-07-30
Last modified date
2008-09-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK38545
Modules/Macros
DSNHSTMD
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
R910 PSY UK38545
UP08/08/15 P F808
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
02 September 2008