Menu

#1518 DB2 SQL query on member file returns hex values

SQuirreL
open
nobody
DB2 Plugin (17)
medium
2023-06-18
2023-06-09
No

I am using Squirrel SQL client with the ODBC driver to connect to the DB2 database, which has no issues in extracting data from the db tables.

I want to extract data from a member file, and have created the alias, and executed the query:

CREATE ALIAS MFXFER.I316_E157324133 FOR MFXFER.GIK316BKP ("E157324133");
SELECT * FROM MFXFER.I316_E157324133;
DROP ALIAS IF EXISTS MFXFER.I316_E157324133;

When I execute the query the returned data is made up of only hex pairs (snippet line 1):

2 f1 f0 40 40 40 40 40 40 40 40 40 40 40 f8 f6 f2 f0 f2 f3 f0 f6 f0 f6 f0 f1 f0 f0 f0 f0 f0 f1 f0 f1 f1 f2 f6 f4 f5 f3 f6 40 40 40 40 40 40 40 40 e5 d6 60 c2 f3 60 f0 f2 f4 40 40 40 40 40 40 40 f2 f0 f2 f3 f0 f6 f0 f6 40 40 40 40 e2 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40

This does not reflect the ASCII values I can see in the member, when I view the same using RDi (Rational Developer for i), or I run the same query directly on a DB2 client.
210 862023060601000001011264536 VO-B3-024 20230606 S
When I copy and paste the hex to a translation tool, I receive only special characters.

Related

Bugs: #1518

Discussion

  • Duane Peters

    Duane Peters - 2023-06-12

    The first hex pair should be 'f2', and not as it states on the initial view '2'.

     
  • Gerd Wagner

    Gerd Wagner - 2023-06-18

    Sorry, I can't reproduce your problem neither on DB2/Linux nor on DB2 UDB for AS/400.

    Are you really using the JDBC-ODBC bridge driver? This generic driver is outdated and you may want to try a native DB2 JDBC driver. Native JDBC drivers are available for all DB2 versions.

     
    • Duane Peters

      Duane Peters - 2023-06-18

      Thanks for getting back to me.

      Duane

      On Sun, 18 Jun 2023, 21:04 Gerd Wagner, gerdwagner@users.sourceforge.net
      wrote:

      Sorry, I can't reproduce your problem neither on DB2/Linux nor on DB2 UDB
      for AS/400.

      Are you really using the JDBC-ODBC bridge driver? This generic driver is
      outdated and you may want to try a native DB2 JDBC driver. Native JDBC
      drivers are available for all DB2 versions.


      [bugs:#1518] https://sourceforge.net/p/squirrel-sql/bugs/1518/ DB2 SQL
      query on member file returns hex values

      Status: open
      Group: SQuirreL
      Labels: DB2 Plugin
      Created: Fri Jun 09, 2023 10:38 AM UTC by Duane Peters
      Last Updated: Mon Jun 12, 2023 09:52 AM UTC
      Owner: nobody

      I am using Squirrel SQL client with the ODBC driver to connect to the DB2
      database, which has no issues in extracting data from the db tables.

      I want to extract data from a member file, and have created the alias, and
      executed the query:

      CREATE ALIAS MFXFER.I316_E157324133 FOR MFXFER.GIK316BKP ("E157324133");
      SELECT * FROM MFXFER.I316_E157324133;
      DROP ALIAS IF EXISTS MFXFER.I316_E157324133;

      When I execute the query the returned data is made up of only hex pairs
      (snippet line 1):

      2 f1 f0 40 40 40 40 40 40 40 40 40 40 40 f8 f6 f2 f0 f2 f3 f0 f6 f0 f6 f0
      f1 f0 f0 f0 f0 f0 f1 f0 f1 f1 f2 f6 f4 f5 f3 f6 40 40 40 40 40 40 40 40 e5
      d6 60 c2 f3 60 f0 f2 f4 40 40 40 40 40 40 40 f2 f0 f2 f3 f0 f6 f0 f6 40 40
      40 40 e2 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
      40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
      40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
      40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
      40 40 40 40 40 40 40

      This does not reflect the ASCII values I can see in the member, when I
      view the same using RDi (Rational Developer for i), or I run the same query
      directly on a DB2 client.
      210 862023060601000001011264536 VO-B3-024 20230606 S
      When I copy and paste the hex to a translation tool, I receive only
      special characters.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/squirrel-sql/bugs/1518/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1518


Log in to post a comment.

MongoDB Logo MongoDB