When unloading a UNICODE table with SQL-ACCESS EXTENSION or NONE there are no rows selected from a WHERE clause like this:
SELECT * FROM DB2ADM.PLAN_TABLE
WHERE BIND_EXPLAIN_ONLY = 'Y'
With SQL-ACCESS ONLY, the expected rows are selected.
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.
DB2 for Z/OS
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.