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.
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.
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.
Read more about option SQL-ENCODING-CCSID in the CA Fast Unload® for DB2 for z/OS - 19.0 manual, section SQL-ENCODING-CCSID.