Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2001

    Unanswered: How to find db2 application CODEPAGE

    Hi there,

    When we run a db2 application, if DB2CODEPAGE profile variable is set
    then application will run in the same codepage, but if it is not set then
    it will find out the underlying OS codepage and application will run with
    that codepage.

    In my case, I have an Embedded SQL program running in C on DB2/6000 7.1. I
    want to find out the codepage in which the application is running from
    inside the program during runtime.

    Any body has any idea how to find application codepage from inside the
    program ???

    Thanks in advance.

  2. #2
    Join Date
    Aug 2002
    As for DB2 V7, I think You can get DB2CODEPAGE value from SQLCA.SQLERRM field when Connecton has completed.
    ( some information is provided delimited by x'ff' and it's 2ND )

    Please see "DB2 Management API" manual " sqlegins " API for description .
    ( you don't have to use Managenet API to connect .
    you can test using Command Center with "Show sqlca" option ON
    and type "CONNECT TO XXXX")

Posting Permissions

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