How to read char() for bit data DB2's type in Oracle?

Hello,
I am developing an application (from JDeveloper) to operate with two data base. In one hand threre is Oracle and in the other one DB2 (AS400).
I am trying to read a DB2'sfield with the "char() for bit data" type from Oracle, but I can't read it.
I have trying:
rset.getObject(1) -->[B@1a786c3
rset.getBinaryStream(1) --> java.io.ByteArrayInputStream@1a786c3
rset.getAsciiStream(1) --> java.io.ByteArrayInputStream@2bb514
rset.getCharacterStream(1) -->java.io.StringReader@1a786c3
Do you have any solution to see the value of this type of field?
Thank you and regards

I have to synchronize unidirectionally from the Oracle database to DB2. And I'd like to save the information of the record of DB2 prior to the update operation.
And here is where the problem arises for me, because when I try to read from Java with the connection established on DB2 is unable to interpret the information. While there are no problems from Oracle to consume the information, it happens that DB2 field types are not common with Oracle, such as char () for bit data. From what I could find the equivalent in Oracle would be raw (), but since Java is possible to read this type of information... And this is my doubt, it is necessary to do any type of cast or to do a special view to retrieve this information?

Similar Messages

  • Data Federator XI 3.0 using DB2 VARCHAR FOR BIT DATA Column?

    We have a column in a DB2 database that is defined as VARCHAR(16) FOR 
    BIT DATA.
    We are using the suggested IBM JDBC driver, db2jcc.jar, against a DB2 
    OS/390 8.1.5 version database.
    The Datasource column displays a data type of NULL, indicating the DF 
    does not understand or cannot handle this IBM data type.
    We have two issues.
    First, target tables are not able to return any columns, regardless if 
    we exclude columns defined as NULL as mentioned above. We see the 
    'Wait' animation for a very long time when we use the 'Target table 
    test tool' option. Selecting to display the count only, returns zero.
    We are able to fetch and view non-NULL column data when using the 
    'Query tool' under the Datasource pane.
    I also get the same result when using the 'My Query Tool' in Server 
    Administrator; a selection agains the sources returns data while 
    selecting from a target table returns no data. Also, a 'select 
    count(*)' returns zero.
    The second issue is in mapping a relationship between two DB2 tables 
    where the join is between two columns of the above mentioned type 
    (NULL).
    The error we get back when we use "Show Errors" is "The types 
    'NULL' (in 'S1.PLANNEDGOALID') and 'NULL' (in 'S2.PLANNDEDGOALID') are 
    not compatible.". When reviewing the relationship, a dashed red line 
    appears instead of a solid grey line between the two tables in the 
    "Table relationships and pre-filers" section of our mapping pane.
    The following query returns an error via the Server Administrator 
    Query Tool; "Types 'NULL' and 'NULL' are not compatible for operator 
    '=' (Error code : 10248)".
    select count(*)
    from
    (select s1.CASEID, s2.PLANNEDGOALID, s2.NAME, s2.PLANNEDGRPSTTYCD
      from "/DF_CMS_ODS/sources/CMFSREPT/CMSPROD.PLANNEDGOAL" AS s1
    ,"/DF_CMS_ODS/sources/CMFSREPT/CMSPROD.PLANNEDGOAL" s2
              where s1.PLANNEDGOALID = s2.PLANNEDGOALID)
    Here are the properties settings in the Resource Connector Settings 
    for jdbc.db2.zSeries we are using.
    capabilities: isjdbc=true;orderBy=false
    driverLocation: drivers/db2jcc_license_cisuz.jar;drivers/db2jcc.jar
    jdbcClass: com.ibm.db2.jcc.DB2Driver
    sourceType: db2
    supportsCatalog: no
    urlTemplate: jdbc:db2://<hostname>[:<port>]/<databasename>
    Here are the Connection parameters as defined for the datasource in DF 
    Designer.
    Defined resource: jdbc.db2.zSeries
    Jdbc connection URL: jdbc:db2://DB2D03:50000/CMFSREPT
    Authentication: Use a specific database logon for all Data Federator 
    users.
    User Name: x
    Password: hidden
    Login domain: -- Choose a defined login domain --
    Supports Schema: checked
    Schema: is empty
    Prefix table names with schema name: checked
    Supports catalog: unchecked
    Prefix table names with the database name: unchecked
    Table types: TABLE and VIEW
    So, the following is the two questions we require answers for...
    Is this a limitation of Data Federator?
    Is there a work around short of changing the datatype in the database.

    Hi Darren,
    The VARCHAR() FOR BIT DATA is a binary data type and Data Federator does not support binaries. But if in your case, it makes sense to map this column to a VARCHAR data type you can configure the DB2 connector to view this column as a VARCHAR.
    Your column can be mapped explicitly to a data type of your choice using a property: castColumnType.
    This property can be set updating the resource you selected when you registered you DB2 data source.
    If the resource is "jdbc.db2", then:
    1. Launch Data Federator Administrator
    2. Click on "Administration" tab
    3. Click on "Connector Settings"
    4. Select the right resource: "jdbc.db2"
    5. Click "Add a property"
    6. Select "castColumnType"
    7. Set its value to: VARCHAR() FOR BIT DATA=VARCHAR
    8. Click on Ok
    You should see this column as a VARCHAR.
    Regards,
    Mokrane
    PS: For the target table issue, we have forwarded your mail to the Data Federator Designer team.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • How to read and write a data from extrenal file

    Hi..
    How to read and write a data from extrenal file using Pl/sql?
    Is it possible from Dyanamic Sql or any other way?
    Reagards
    Raju

    utl_file
    Re: How to Create text(dat) file.
    Message was edited by:
    jeneesh

  • How to put condition for one date range should not interfear with another ?

    hi friends,
    how to put condition for one date range should not interfear with another  date range.
    my data base table has two fields
    from date
    to date.
    when we enter the date range in the data base , new date range means from date and to date should not interfear.
    can  anybody help me.
    thanks &Regards,
    Revanth
    Edited by: rk.kolisetty on Jul 1, 2010 7:18 PM

    Do it the SAP way....
    First entry...from is today, to is 99991231.
    New dates entered, now we have two rows...:
        from is original date  to becomes yesterday.
        From is today          to is 99991231

  • Settings for costing data in order types for plant maintenance

    i want to know the purpose of settings for costing data in order types for plant maintenance. do we need to do it for sure i mean are those settings mandatory to analyze the costs on work order

    Yes you need to maintain those settings, as the plant maintenance orders are also considered as cost objects and in order for you to post any cost, you need to have a cost object.  Unless you maintain these settings, the cost you posted cannot be settled to a cost center.
    Assign points as a way to say thanks.
    Madhav Nanduri

  • How to read multiple lines from an external file to the Oracle data base

    Hi Guys,
    I have an external file which contains multiple lines and I want to read it to the data base .I have done it for the file if it contains one line.
    Please guide me how to retrieve all the lines into the data base.And also tell me how Oracle will come to know the end of the line in the file
    Thanks,
    Prafulla

    Hi,
    try this
    CREATE TABLE ab
    a VARCHAR2(1 BYTE),
    b VARCHAR2(2 BYTE),
    c VARCHAR2(10 BYTE),
    d VARCHAR2(11 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY dir_name
    ACCESS PARAMETERS
    ( records delimited by newline
    fields (
    a POSITION(*) CHAR(1),
    b POSITION(*) CHAR(2 ),
    c POSITION(*) CHAR(10 ),
    d POSITION(*) CHAR(11 )
    LOCATION (dir_name:'filename.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    Regards,
    Simma....

  • How to Read and write array data into notepad or lvm?

    Hello,
    I am new to Labview and i wanted to use it in my project where i get accelerometer values X,Y and Z serially into a notepad and then displaying those values in Labview as a 3D plot or graph.The problem i am facing is the use of Cover to dynamic data express VI and how to save the array in a notepad or a lvm file.i was testing a basic block of building x and y values separately.was successful in plotting it to  graph but dont know how to save those values in a file.Can some1 please help me out in his ??
    Solved!
    Go to Solution.
    Attachments:
    Capture.PNG ‏22 KB

    Thank you for looking into this. Since I was converting into dynamic data before writing it I thought you have to convert it after reading but then I got stuck as to whether build the array again so as to display it in the graph. Dennis I did what you said and the graph on reading is a bit funny just started today and I am kinda skipping the long tutorial due to shortage of time. sorry
    Attachments:
    Capture.PNG ‏32 KB
    Capture2.PNG ‏59 KB

  • How to read context node/attribute data of diff UI component of same screen

    Hi,
    I am new to CRM and as well as BSP, Now the requirement is, at the time of Lead creation, when the end user enters customer code and sales area i need to fetch and display the customer group 1 value( VIP,KAM etc) based on the customer's sales area, ( these are sales area specific values).
    but the problem is Customer code is in diff UI component and sales area data is in diff UI component .
    1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
    2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
    3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.    
    To display the value in the context node BTLEADH, i need to know the sales area data which is entered in BTORGSET.
    Kindly let me know how to read the data which is in diff UI component of the same Lead creation screen.
    i written following code in context node BTLEADH, atttribute New Zfield, in get method, but not able solve, please guide me.
      DATA: LR_ENT TYPE REF TO CL_CRM_BOL_ENTITY,
                 LR_COL TYPE REF TO IF_BOL_ENTITY_COL.
      LR_ENT ?= ME->TYPED_CONTEXT->BuilHeader->COLLECTION_WRAPPER->GET_CURRENT( ).
      LR_COL = LR_ENT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilSalesArrangementRel' ).
      LR_ENT ?= LR_COL->GET_FIRST( ).
      IF LR_ENT IS BOUND.
        LR_ENT->GET_PROPERTY_AS_VALUE( EXPORTING IV_ATTR_NAME = 'DIVISION'  IMPORTING EV_RESULT =  LV_DIVISION  ).
      ENDIF.
    I'll appreciate if you can provide me some documents to refer.
    awaiting for your responses.
    Thanks
    Bhanu

    Hi Gangadhar,
    I think i have not clearly explained my requirement, let me put it once again. My requirement is, I have to read two UI component data, validate and display some value in one new zfield which is in one of the UI components.
    I need to display customer's sales area specific data like customer group 1 value in that new zfield. for that i need Customer code and as well as sales area data from the screen.
    1) customer code attribute is in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT.
    2) sales area fields are in the UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET.
    3) I have created new field(customer type to display the customer group 1 value "VIP") in UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTLEADH.
    As per my understanding, in the context node BTLEADH, GET_METHOD of atttribute New Zfield, i have to read customer code from UI component BT108H_LEA, View BT108H_LEA\Detail, Context node is BTPARTNERPROSPECT and Sales area data from UI component BTORGSET, View BTORGSET\OrgSetData, Context node is BTORGSET based on the values, validate and display the data.
    But as per your recent reply you are asking me to write the code in get_property_attribute---division. so i didnt understand.
    Kindly clarify if i am wrong.
    awaiting for your response.
    Thanks
    BHanu

  • How to use exception for a Date Key Figure

    Hello All,
                    I have the following requirement.
    1. I have a Key Figure which is Date Type.
    2. I need to color the cell to green if the it is filled with date otherwise leave it as it is.
    Please suggest how to overcome it.
    Thanks & Regards,
    Rajib

    hi,
    Your requirement is not clear, you have the below setup
    I have the following requirement.
    1. I have a Key Figure which is Date Type.
    How can a KF be of date type, or is it the value of a date characteristic that you have extracted in KF using formula variable. If yes you just need to define exception for the value greater than 0.
    regards,
    Arvind.

  • How to read char from console

    Hi can any body help me..
    I want to read char from keybord. withought pressing ENTER.
    I am not sure how i can do it. I can't use
    BufferedReader br = new  BufferedReader(new InputStreamReader ( System.in )) ;
    char key ;
    key = (char )br.read() ;
    cuz i have to press ENTER every time to read char.
    Thanks in advance.

    try this,I' have found a part on Internet
    package exercises;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    * questa � la classe d' esempio per leggere l'input dalla console*/
    public class Echo {
    public static void main(String args[]) throws Exception{
    // This is where the magic happens. We have a plain old InputStream
    // and we want to read lines of text from the console.
    // To read lines of text we need a BufferedReader but the BufferedReader
    // only takes Readers as parameters.
    // InputStreamReader adapts the API of Streams to the API of Readers;
    // receives a Stream and creates a Reader, perfect for our purposes.
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String input = "";
    while(true){
    System.out.print("ECHO< ");
    //As easy as that. Just readline, and receive a string with
    //the LF/CR stripped away.
    input = in.readLine();
    //Is a faster alternative to: if (input == null || input.equals(""))
    //The implementation of equals method inside String checks for
    // nulls before making any reference to the object.
    // Also the operator instance of returns false if the left-hand operand is null
    if ("".equals(input)){
    break;
    }else
    // Here you place your command pattern code.
    if ("ok".equals(input)){
    System.out.println("OK command received: do something �");
    //Output in uppercase
    System.out.println("ECHO> " + input.toUpperCase());
    System.out.println("ECHO> bye bye");
    //We exit without closing the Reader, since is standard input,
    // you shouldn't try to do it.
    // For all other streams remember to close before exit.
    }

  • How to read certain span of data from SQL-databa​se ?

    Hi All,
    I'm using LV 8.5 with Database Connectivity Toolset
    My aim is read certain time span data from MySQL-database. Let's assume that I have rocorded data from 1.1.2008 to 25.1.2008. My database table contain two columns "timestamp" and "data". How  I can select  e.g. span 20.1.2008 10:00 - 21.1.2008 14:00? I think that I have to use VI "Select Data" and write something to connector "optional clause". I can't find any example how to write clauses to this connector.
    I managed to select all data but that consumes quite much CPU time and I usually need only smaller data sets.
    BR,
    Jim

    The VI DB Tools Select Data has an input called (at the top) called "optional clause". You can wire an SQL predicate to this input that control the rows that are returned by the VI. In your case, you want to use what's called a WHERE clause to filter the rows to be the subset you need.
    For the toy database I was playing with I had to set the optional clause to: "where startdate > #3/1/2008#" to make the VI return rows which had a startdate field of later than 01-Mar-2008. I was using the JET DB engine, not sure if the same syntax will work for other SQL engines, so your mileage may vary. :-)
    Let me know if you need more information or want to take a look at my example VI.
    Cheers!
    Pramod
    Message Edited by PramodS on 04-09-2008 01:26 AM

  • How to retrieve DELTA for Particular date for FIGL(ECC) into BI

    Hi,
    Model of this ODS is in BW3.5.  (DS --> ODS --> Infocube)
    My loads are daily from 0FI_GL_4 (line Items) into ODS. There was from error in the load, so I deleted the request (manage & and made QM status RED in monitor also) from ODS and also from PSA for a particular date(xx.xx.xxxx).
    Now I tried loading the Infopackage, but the data is not coming for that date (xx.xx.xxxx) into ODS.
    I have set to DELTA REPEAT in RSA7(ECC) , but after saving, it is again coming back to DELTA UPDATE.
    All the Previous and Next day load was fine,but i did not get the data for xx.xx.xxxx.
    In Selection screen for DS and Infopackage does not have 0CALDAY or 0PSTNG_DATE.
    Can you please help me out in telling how to get the data for that particular date (xx.xx.xxxx) into BI.
    DOES REPAIR FULL REQUEST SOLVE MY PROBLEM?
    Full Points will be assigned.
    Regards,
    Bindu.

    Hi Viren,
    Initially I have tried what you have said, but ERROR is coming as AS YOUR PREVIOUS DELTA IS INCORRECT, YOU CANNOT LOAD THIS DELTA. I am not getting any option of REPEAT DELTA.
    "I have set to DELTA REPEAT in RSA7(ECC) , but after saving, it is again coming back to DELTA UPDATE."
    As I am not getting REPEAT DELTA, to get that I tried saving the 0FI_GL_4 as DELTA REPEAT in RSA7 (ECC).
    Please let me know any more information required.
    Thanks,
    Bindu.

  • How InfoSpoke reads time dependent master data ?

    Hello Experts !!
    How InfoSpoke reads the time dependent master data ?
    What key date it reffers to ?
    Can you please explain, I want to use this concept in writing master data lookup for time dependent attributes of 0MATERIAL.
    Thank a lot !

    You can either specify the time period in the filtering area of infospoke or you can implement a transformation BAdI -OPENHUB_TRANSFORM to manipulate the data whichever way that suites your requirement. All time dependent infobjects have datefrom and dateto fields which you can use to choose your data range accordingly.
    Hope this helped you.

Maybe you are looking for

  • Time Machine in Yosemity? Beachball!!

    Why oh why is the yosemity incarnation of time machine bringing my macbook pro to a grinding halt? Nowadays it takes the program hours to backup a measly 35Mb while presenting me with the dreaded spinning beachball for minutes at an end. The program

  • Equivalent for AUTHID CURRENT_USER in view

    Hi, I'm facing a problem with a view which belongs to user a and I would like to select tables from user b. Exemple : user a - table MYTAB user b - table MYTAB done by user a : "create or replace view MYVIEW as select * from MYTAB" grants and synonym

  • [solved] could not load module 'processor'

    Since the recent upgrade to kernel 2.6.20.7-1 the acpi kernel modules have to be loaded manually. Thats all good, i don't have a problem with that. On my desktop I load  'button', 'processor'. But since the upgrade to 2.6.20.7-2 the module 'processor

  • HT4623 help with upgrading iphone 3 or 3g software

    i have the iphone 3g or 3 when i try to update in itunes the software from4.2 to get latest software it says i have the latest update but i know thats not right. i am trying to download facebook app and it wont allow as it says i need to upgrade the

  • How can I remove a trojan?

    As my Mail Application keeps asking for a Password, even though I have just given it, I entered BT Yahoo, which is still working. There I found about 3,000 failed EMail reports. All refered to a need to check security and were from a Bank in Qatar. T