Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2012-10-30T08:36:53Z by Sidhumohan
SystemAdmin
SystemAdmin
6184 Posts
ACCEPTED ANSWER

Pinned topic Pass BLOB element from one input card to other

‏2012-09-26T13:05:52Z |
Hello,

I have 2 input cards in my map. In the 1st ipnut card, I have a blob field and am getting some text in XML format inside that field. The structure of this XML is always fixed and we have a XSD for that. Using that xsd, I have created a 2nd input card.
Now I want to pass this blob field (containing the XML) to this 2nd input card so that all the fields in the XML will go in appropriate places. Could anyone please let me know how this can be done?

Thanks
Updated on 2012-10-30T08:36:53Z at 2012-10-30T08:36:53Z by Sidhumohan
  • repanzer1
    repanzer1
    114 Posts
    ACCEPTED ANSWER

    Re: Pass BLOB element from one input card to other

    ‏2012-09-26T20:32:24Z  in response to SystemAdmin
    Ok, so your first input card is defined as a blob, but the data being passed to it is XML. And you want to use that XML for your second input card, which has the XML defined in the type tree the card is pointing to.

    Right off the bat, I'm going to ask why don't you just point your second input card to this data that you are pointing your first input card to? The only reason I can think of is, is that there is more data then the XML that the first input card reads in, and you want to take that XML embedded in there and pass it to your second input card. I really can't think of any other reason off hand. Could you explain why you don't just point the second input card to the data the first input card is pointing to?

    Regardless, you can not pass data to an input card from inside a map, you can only point your input card to the data, like a file in a directory or to a message queue or FTP site, which the map will read in when it is initiated. The only way to push data from a map to an input card is by executing the run map statement.

    When a map is initiated, the first thing it does is valiate the data the first input card is pointing to against the type tree, then does the same for the second input card, and so on for all the input cards.


    There are 10 types of people in this world. Those who understand binary and those who don't.
  • Sidhumohan
    Sidhumohan
    34 Posts
    ACCEPTED ANSWER

    Re: Pass BLOB element from one input card to other

    ‏2012-10-30T08:35:42Z  in response to SystemAdmin
    Hi,

    There is a way to do it. Pass the entire blob data inside a run fucntion to another map and in that map use the XML type tree as input. Map the same XML to output and use REFORMAT function that will solve the problem.
  • Sidhumohan
    Sidhumohan
    34 Posts
    ACCEPTED ANSWER

    Re: Pass BLOB element from one input card to other

    ‏2012-10-30T08:36:53Z  in response to SystemAdmin
    Let me know if u need more help