Topic
  • 1 reply
  • Latest Post - ‏2014-12-24T13:10:16Z by NarasimhaRaoEarla
SystemAdmin
SystemAdmin
100 Posts

Pinned topic Processing Ref Cursor Output

‏2009-06-18T23:04:49Z |
The attached project is in response to https://community.castiron.com/node/2416 to process and filter the output from a Ref Cursor. The file attached to the original post contains a mix of meta-data and the flat-file data needed by the client. I've used the "filter recurring nodes" function of the mapper to only allow those XML elements that do not start with the "/" character (eliminating the meta-data rows). The XPath is "not(starts-with(column1, '/'))"
Next, we use a simple flat-file schema that contains a repeating list of row elements that will be separated by end-of-line characters (defined at the root level of the flat-file schema). This will produce a file like this:
data<cr>
data<cr>
Where data is the rows extracted from the Ref Cursor data that does not start with "/" - i.e. the data that needs to be processed.
Note: To simplify things for reproducing the use case, I created a standalone XSD that represents the Ref Cursor output, and I'm using ReadXML to allow me to parse the posted data. In reality, the filtering of the recurring nodes should happen in the map outputs of the stored procedure activity. The actual sequence of steps should be:
1) Execute the stored procedure
2) Filter the output using the XPath I'm using
3) Serialize the data using the same flat-file schema
4) Write the serialized output to the target system using FTP Put, or whatever appropriate activity fits the solution.
Attached is the project file and zipped XSD (just in case).
Regards,
Alan
 
  • NarasimhaRaoEarla
    NarasimhaRaoEarla
    1 Post

    Re: Processing Ref Cursor Output

    ‏2014-12-24T13:10:16Z  

    Hi Alan,

     

    We did not find the attachment in your post. Could you please provide and help us to handle the ref cursor in Websphere Cast Iron.

     

    Thanks in Advance.

    Regards,

    NarasimhaRao