No rows unloaded from a Unicode table.

book

Article ID: 6395

calendar_today

Updated On:

Products

CA Database Analyzer for DB2 for z/OS CA Fast Unload for DB2 for z/OS CA Fast Check for DB2 for z/OS CA Fast Index for DB2 for z/OS CA Fast Load for DB2 for z/OS CA Rapid Reorg for DB2 for z/OS

Issue/Introduction

When unloading a UNICODE table with SQL-ACCESS EXTENSION or NONE there are no rows selected from a WHERE clause like this:

SQL-ACCESS NONE                   

SELECT * FROM DB2ADM.PLAN_TABLE  

WHERE BIND_EXPLAIN_ONLY = 'Y'     

;                                 

 

With SQL-ACCESS ONLY, the expected rows are selected.

Cause

The problem with no rows selected occurs when option ‘SQL-ENCODING-CCSID(0)’ is defined in the PFU parmlib member.

When 0 (zero) is specified, the SYSIN stream is not translated to another CCSID and the literal ‘Y’ (x’E8’) in the WHERE clause does not match Unicode character ‘Y’ (x’59’) in column BIND_EXPLAIN_ONLY of the PLAN_TABLE. 

Environment

DB2 for Z/OS

Resolution

The SQL-ENCODING-CCSID(0) setting can be overridden by specifying SQL-ENCODING-CCSID(37) in the SYSIN to avoid the problem. CCSID 37 is the default.

 

You may also consider if you need 'SQL-ENCODING-CCSID(0)' as a global option. 

Additional Information

Read more about option SQL-ENCODING-CCSID in the  CA Fast Unload® for DB2 for z/OS - 19.0 manual,  section SQL-ENCODING-CCSID.