4 Replies Latest reply: May 9, 2013 4:37 AM by DecaXD Branched to a new discussion. RSS

    ODI AS/400 JDBC Driver

    974238
      Hi Guys,
      Iam trying to do a load from AS/400 to ORACLE bu using 'com.ibm.as400.access.AS400JDBCDriver' as my JDBC Driver in Topology.
      Iam getting a strange problem like in AS/400 we have city column length 20 and it got a funny character like 'LØONDON' when it loads in to ORACLE
      is is adding an extra blank space and getting failed beacause column length is lesss then what it is getting.
      Any idea how to fix this kind of issues between AS/400 and ORACLE?

      Cheers

      Edited by: 971235 on 08-May-2013 04:07
        • 1. Re: ODI AS/400 JDBC Driver
          DecaXD
          HI,

          change your varchar2( X BYTE) to varchar2(X CHAR). This is a characterset issue.

          Let us know
          • 2. Re: ODI AS/400 JDBC Driver
            zoran_2000
            Hello,

            if you click on the A column in the target pane, you see the mapping implementation in the Property Inspector.
            For example TABLE.A change this in RTRIM(TABLE.A,' ')
            Rtrim delete extra blank space .
            you can use others SQL function.

            Let us know
            • 3. Re: ODI AS/400 JDBC Driver
              974238
              Hi,

              Thanks for that.It works if i change it to NVARCHAR2,The only thing is, if target database team in case if they are not willing to change the data type, it it anyway can i do this nvarchar2 to varchar2 conversion?
              i.e i can load it into temp table which will have NVARCHAR2 Type and then anyway can it conver it to VARCHAR2 when i load using ODI?

              I do not not want to Apply TRIM because if we reach max lenth we will fail when the text strings get closer to the 100 Byte(current length of the column) limit in this case.

              Any ideas of converting from NVARCHAR2 TO VARCHAR2?

              Cheers
              • 4. Re: ODI AS/400 JDBC Driver
                DecaXD
                Hi,

                here a description

                how to change nvarchar to varchar without delting record?

                the issue is due that some char occupy more bytes than another. If you are not working on a Worldwide application usually is sufficient to set a correct charset in your loading procedure.