Have not seen this.
Couple of random thoughts:
Do a DSPFD on the files in question. Something related to CCSID 65535 possibly ? He's been problematic in the past.
Did you do the STRSQL query in *SYSTEM or *SQL mode ? *SQL mode is probably similar to ODBC.
Did you try the query in ACS ? Same question applies in *SQL or *SYSTEM mode.
Post your sample Python program and I'm happy to test against a few of my libs.
Someone on Ryver mentioned PTFs.
Are you on latest ODBC driver from IBM ?
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
----------------------------------------------------------------------
message: 1
date: Fri, 21 May 2021 11:16:20 -0400
from: John Yeung <gallium.arsenide@xxxxxxxxx>
subject: [IBMiOSS] Queries over ODBC not always the same as in STRSQL?
I was trying to get the number of members in various source physical files.
So I whipped up a little Python script containing the following SQL:
select count(*) from qsys2.syspartitionstat
where table_schema = ? and table_name = ?
For some files, this works fine. For others, it (very quickly) returns 0, even though there are definitely members. This happens whether I'm running from my PC or from PASE. The same SQL works fine in STRSQL for any file I've tried.
If there is any pattern to it, it seems the files with a lot of members (say, over a couple thousand) come back as empty over ODBC.
Files with a smaller number of members work fine with both ODBC and STRSQL.
Has anyone else noticed this? Is it a limitation of the ODBC driver?
John Y.
As an Amazon Associate we earn from qualifying purchases.