No rows unloaded from a Unicode table.
search cancel

No rows unloaded from a Unicode table.

book

Article ID: 6395

calendar_today

Updated On:

Products

Database Analyzer for DB2 for z/OS Fast Unload for DB2 for z/OS Fast Check for DB2 for z/OS Fast Index for DB2 for z/OS 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.

Environment

DB2 for Z/OS

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. 

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.