Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2013
    Posts
    5

    Unanswered: Problem in fetching data from Mainframe DB2 database

    Hello -

    I'm new to Db2 and I'm facing issue in extracting data from mainfram DB2 database.

    There is a DB2 Mainframe database and one field of table is defined as varchar (1200).

    Code page of this database is EBCDIC 37 (US English)

    When I query the table from DB2 prompt, it is not showing the data in one column

    I tried quering the same table from DB2COPY command editor and I'm able to the data in the same column from Query result tab and command window is not showing the data.

    Attaching the screen shot FYI..
    Attached Thumbnails Attached Thumbnails DB2 issue.png  
    Last edited by nmaturi; 08-12-13 at 20:27.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    And your question is?

    Looks like you may have some control characters in there, like carriage returns or line feeds.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2013
    Posts
    5
    Thanks, My question is how to extract the data by ignoring the null-printable characters in SQL.

    Is there a way to acheive this?

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    What is "null-printable"? You could use the TRANSLATE function to remove non-printable characters. I'm sure you realize character codes that are correspond to printable characters in EBCDIC may produce non-printable ASCII or UNICODE characters, and vice versa.
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Aug 2013
    Posts
    5
    It is typo, I mean non printable characters.

    I will look into translate function of DB2.

    Thanks again for your response.

  6. #6
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    do you perhaps want the data returned to you in ASCII rather than EBCDIC?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •