IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  Submap returning Null

    Posted 04/21/16 08:16 AM

    Originally posted by: AnjaliMKanjinghat


    Hi ,

     

    In z/os enviornment when WTX main map is calling a submap, I can see the starting and ending tag of the target xml . But the data which is supposed to be inside the xml tags is NONE. I am converting the output to Character Set Native using CTEXT function. Is it  because of the CTEXT ? Will it make a difference if I use CPACKAGE?

     

    Thanks in Advance,

    Anjali

     


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Submap returning Null

    Posted 04/22/16 01:31 PM

    Originally posted by: RichMcFate


    Anjali -- what do you mean by submap?  Are you invoking a functional map or a compiled map using the RUN() function?

    How are you using CTEXT?  If you're calling a functional map, you can not pass the result of a functional map to another function without using the ASFUNCTION() function.  Even so, that wouldn't explain why you get nothing.  What would happen is that the functional map would write directly to the output without applying CTEXT.

     

    My wild guess here is that your map simply isn't being executed -- perhaps because one of its arguments is evaluating to NONE.   We'll need more information to make a better suggestion.

    Thanks,

    Rich McFate


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: Submap returning Null

    Posted 04/25/16 04:49 AM

    Originally posted by: paul.brett


    It is important to understand how CTEXT() and CPACKAGE() are working.

    =CTEXT(In1,"NATIVE")

    ....does not mean convert the input to NATIVE.  What it means is....  assume that the input is native already (ignore the current object encoding completely).

    So, in a RUN() function on the z/OS platform, where the content needs to pretend to be NATIVE (otherwise it will be converted to EBCDIC) you might use it thus:

    =RUN("SubMap.mvs",ECHOIN(1,CTEXT(In1,"NATIVE"))

    ...where your top level map input is UTF-8 and your sub map is also expecting UTF-8.

    Now this is where it gets interesting.  If you place this rule in an output object rule cell that is defined as anything other than NATIVE, you also need to take account of the fact that the result will be assumed to be NATIVE, and may be converted, and thus you might need to wrap the entire rule in another CTEXT() just to ensure that it is not converted:

    =CTEXT(RUN("SubMap.mvs",ECHOIN(1,CTEXT(In1,"NATIVE")),"UTF-8")

    In summary, the rule above is saying, ....  take the input, pretend it is already NATIVE (don't do any conversions) and send it to the sub map.  Take the result, pretend it is already UTF-8 (don't convert it) and place it directly on the resulting object.

    I hope this makes sense.

    Thank-you.

    Paul.

    Follow me on Twitter


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Submap returning Null

    Posted 04/25/16 06:13 AM

    Originally posted by: AnjaliMKanjinghat


    Thanks Paul. It helped.


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange