IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

MQ Adapter questions

  • 1.  MQ Adapter questions

    Posted 09/21/10 07:35 AM

    Originally posted by: shade33


    I'm trying to configure MQ adapter for WTX. But I've not found solutions for two questions:
    1. How to remove MQ headers before message transformation?
    2. I want WTX grab all messages from MQ queue and remove them from the queue. How to configure adapter to do that?
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: MQ Adapter questions

    Posted 09/21/10 08:05 AM

    Originally posted by: SystemAdmin


    If there is no data in the MQ header that you need then don't include the -HDR parameter in the adapter command line.
    Without the -HDR you will just get the MQ message body.

    A typical input MQ adapter string for the WTX Launcher would be:
    
    -QMN queuemanagernname -QN queuename -CMSG -REFRESH 60 -EQN backoutqueue
    

    this will retrieve messages from the input queue.

    Setting the OnSuccess parameter to Delete in the input card will remove the messages after the map has completed.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: MQ Adapter questions

    Posted 09/21/10 08:53 AM

    Originally posted by: shade33


    Thanks a lot. Delete setting really wokrs :)
    But I still receive warning about RFH strings without -HDR command.
    And what right way for running map via java api that asks MQ queue about new messages?

    Now my map proceed only one message
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: MQ Adapter questions

    Posted 09/21/10 09:59 AM

    Originally posted by: SystemAdmin


    there's no way of not getting the RFH header - you'll need to adjust your input type tree to process it.
    there are other posts in the forum that include an RFH type tree.

    >And what right way for running map via java api that asks MQ queue about new messages?
    if using a java API you need to determine what triggers your maps and when.
    E.g. do you currently see it as time driven or event driven?

    If event driven, the Java API will need to connect to the queue and listen for messages.
    You may find it's then easiest for the Java API to also pull the message from the queue and pass the message as a blob of data to the map - i.e. the WTX MQ adapter is not used at all.
    (this may simplify the handling of the RFH header too).

    (Also note that I don't know much about the java API - so there may be better ways of doing this!!)
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: MQ Adapter questions

    Posted 09/22/10 11:24 AM

    Originally posted by: TarunB


    In some cases the MQRFH2 data is optional and can be switched off using the JMSAdmin tool - it depends on the queue type. Within this tool you can also set the target client to MQ, so that the JMS header is not sent. Basically you are specifying that the target is non-JMS.

    Another option as mentioned by Olly is to change your input type tree to optionally expect a MQRFH2 group.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: MQ Adapter questions

    Posted 09/28/10 08:47 AM

    Originally posted by: shade33


    I've continueed read docs and now have new questions :)

    I configure my map with follow options:
    Fetch as: Burst
    FetchUnit: 1
    Command: -QMN QM_1 -QN Q1 -QTY S -LSN 0

    But when I read a queue with 200 messages I get 201 messages in a output queue (one is empty). I wannt have that :)

    Second. When I run my map with empty queue default output message is generated. I wannt have that too.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 7.  Re: MQ Adapter questions

    Posted 09/28/10 10:32 AM

    Originally posted by: SystemAdmin


    Try changing the output of the map so that OnSuccess is CreateOnContent instead of Create.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 8.  Re: MQ Adapter questions

    Posted 09/29/10 04:49 AM

    Originally posted by: shade33


    But my output content is not empty. Map generate xml skeleton without data.

    I think I should modify typetree or map so they don't work for empty input.

    I use type tree created on edifd08b.mtt from Pack for EDIFACT as input type tree.

    And generate output type tree from my xsd schema.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 9.  Re: MQ Adapter questions

    Posted 09/29/10 04:55 AM

    Originally posted by: SystemAdmin


    I agree - you should change your output type tree so that no output is generated when the map is run with no input.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 10.  Re: MQ Adapter questions

    Posted 09/29/10 05:03 AM

    Originally posted by: shade33


    sorry for dummy question, but i don't understand how to do it. I've tried to change range for root element to 0:1 but without changes in maps work
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 11.  Re: MQ Adapter questions

    Posted 09/29/10 05:39 AM

    Originally posted by: TarunB


    Look at your (empty) output data and see which XML tags are being produced even though there is no data for them. Then change the type tree to make those tags optional, and in some cases the group which contains them too.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 12.  Re: MQ Adapter questions

    Posted 09/29/10 07:47 AM

    Originally posted by: SystemAdmin


    you can't change your type tree or you're referencing the XSD directly, then try creating another output card.

    In the new output card use a single field with a rule like:
    
    IF (PRESENT(field:XML Output Card), TEXT(XML Output Card), NONE)
    


    then point the XML output card at SINK and your new output card at the MQ queue (with create on content).
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender