A fix is available
APAR status
Closed as program error.
Error description
A SQLCODE -332 IS ISSUED WHEN EBCDIC OR ASCII GRAPHIC DATA BEING USED IF THE SYSTEM PARAMETER MIXED IS SET TO NO
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 10 for z/OS users who use graphic * * host variable in SBCS system. * **************************************************************** * PROBLEM DESCRIPTION: SQLCODE -332 is issued when following * * conditions are true. * * 1. The value of the field MIXED DATA * * on installation panel DSNTIPF is NO. * * 2. The table or view is EBCDIC or * * ASCII, or the application encoding * * scheme is EBCDIC or ASCII. * * 3. The statement references a graphic * * host variable. * **************************************************************** * RECOMMENDATION: * **************************************************************** SQLCODE -332 may be issued when the following conditions are true: 1. The value of the field MIXED DATA on installation panel DSNTIPF is NO. 2. The table or view is EBCDIC or ASCII, or the application encoding scheme is EBCDIC or ASCII. 3. The statement references a graphic host variable. When the table or view is EBCDIC or ASCII and the value of the MIXED DATA on installation panel DSNTIPF is NO, the encoding scheme of the statement is EBCDIC or ASCII, and the graphic host variable in the statement is processed in EBCDIC or ASCII. However, there is no double byte CCSID for the graphic host variable because of MIXED DATA = NO. This causes SQLCODE -332 to be issued when conversion for this graphic host variable is needed. For example: Assume that table TESTU000 is defined with CCSID EBCDIC, and contains the following columns: C1 SMALLINT C2 CHAR(40) C3 CHAR(40) Assume that the application is COBOL with the following declarations: TESTU000-C1E PIC S9(5) COMP-5. TESTU000-C2E PIC X(40). TESTU000-C3E PIC X(40). TESTU000-C2N PIC N(40) USAGE NATIONAL. The TESTU000-C2N will be mapped by DB2 as a graphic host variable. The SQL statement below has a predicate references the graphic variable TESTU000-C2N and the character column C2 in table TESTU000 which is defined with CCSID EBCDIC. SELECT C1, C2, C3 INTO :TESTU000-C1E, :TESTU000-C2E, :TESTU000-C3E FROM TESTU000 WHERE C2 = :TESTU000-C2N SQLCODE -332 will be issued when this SQL statement is bound, because there is no double byte CCSID for the graphic host variable TESTU000-C2N. The similar problem occurs when a statement is processed as a multiple encoding scheme statement and the statement is bound with BIND option ENCODING(EBCDIC) or ENCODING(ASCII). A graphic host variable is a variable that is mapped to DB2 GRAPHIC, VARGRAPHIC, and DBCLOB data type.
Problem conclusion
To avoid SQLCODE -332 as shown in the above example, starting in DB2 10 New Function Mode (NFM), DB2 will use Unicode encoding scheme for the graphic host variable when the field MIXED DATA on installation panel DSNTIPF is NO and: 1. the statement is a EBCDIC or ASCII encoding scheme statement, or 2. the statement is a multiple encoding scheme statement and the application encoding scheme is EBCDIC or ASCII. Also starting in DB2 10 NFM, if such a graphic host variable is referenced in the statement, the comparison rule or the result data type rule that involves a graphic operand will use the column's CCSID (or the derived value based on a column's CCSID) Additional keywords: SQLCCSID SQLGRAPHIC SQLVARGRAPHIC SQLENCODING
Temporary fix
Comments
APAR Information
APAR number
PM87230
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-04-17
Closed date
2013-08-12
Last modified date
2013-09-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK96630
Modules/Macros
DSNXOBFC DSNXODTR DSNXOP0 DSNXOTDA
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RA10 PSY UK96630
UP13/08/28 P F308
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":"10.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":"10.1","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
03 September 2013