Topic
3 replies Latest Post - ‏2012-08-17T06:51:09Z by bluey01
HRFM_Christina_Gregory
2 Posts
ACCEPTED ANSWER

Pinned topic From DB2 UDB iSeries to DB2 Express-C

‏2012-07-26T20:32:56Z |
Trying to run a DB2 UDB iSeries "Create Table" script in DB2 Express-C and I get the following error message: An unexpected token "37" was found following".

Sample script:
CREATE TABLE C0228301.A_PMDRESP (
PRSSNID CHAR(32) CCSID 37 NOT NULL DEFAULT '' ,
PRMEDIACD CHAR(15) CCSID 37 NOT NULL DEFAULT '' ,
PRMQF NUMERIC(5, 0) NOT NULL DEFAULT 0 ,
PRRSPNO NUMERIC(3, 0) NOT NULL DEFAULT 0 ,
PRRSPCBOX CHAR(1) CCSID 37 NOT NULL DEFAULT '' ,
PRPROCSTAT CHAR(1) CCSID 37 NOT NULL DEFAULT '' ,
PRINQNO NUMERIC(10, 0) NOT NULL DEFAULT 0 )

RCDFMT APMDRESPF ;

How do I fix this?

Thanks!
Updated on 2012-08-17T06:51:09Z at 2012-08-17T06:51:09Z by bluey01
  • SystemAdmin
    SystemAdmin
    5837 Posts
    ACCEPTED ANSWER

    Re: From DB2 UDB iSeries to DB2 Express-C

    ‏2012-07-27T06:29:34Z  in response to HRFM_Christina_Gregory
    Hello Christina,

    The only values supported for keyword CCSID are ASCII or UNICODE.

    http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp?topic=%2Fcom.ibm.db2.luw.sql.ref.doc%2Fdoc%2Fr0000927.html

    Regards

    Yves-Antoine Emmanuelli
    • HRFM_Christina_Gregory
      2 Posts
      ACCEPTED ANSWER

      Re: From DB2 UDB iSeries to DB2 Express-C

      ‏2012-07-31T15:53:33Z  in response to SystemAdmin
      Yves-Antoine,
      Thanks for the response. Unfortunately, I'm not familiar with IBM DB2. So how do I set up DB2 to ensure it interprets characters correctly?

      Thanks,
      Christina
      • bluey01
        bluey01
        10 Posts
        ACCEPTED ANSWER

        Re: From DB2 UDB iSeries to DB2 Express-C

        ‏2012-08-17T06:51:09Z  in response to HRFM_Christina_Gregory
        There are a couple of ways of gettnig the script from the iSeries. If you aer using iSeries Navigator, then right click onthe tables and Generate SQL and under the options tab, select ANSI/ISO. THis will give you the basix SQL that will run on DB2 LUW.

        You could aslo install IBM DataMovement Tool - this will generate the tables and also allow you to transfer the data as well. And its free!

        You can install DataStudio and connect to the iSeries with that and Generate DDL from within Data Studio - then you can connect to an LUW database and run it - without having to leave the tool