IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
  • 1.  xmllib->VALIDATEEX log filepath

    Posted Wed December 07, 2016 10:07 PM

    Originally posted by: johnxp


    Anyone can help me on below the issue?

    I am using registry in xml validation function, it's not working.

    If I hard-code the log file path in the function, it will work.

    The code I am using as the following

    =IF( xmllib->VALIDATEEX(PACKAGE(ISO_PAIN_001), "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd", "%PAY_Log_Output%\pain.001.001.03.Err.log" ) != 0,
            FAIL("XML Validation Error. Please check the log for details.") )

     


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


  • 2.  Re: xmllib->VALIDATEEX log filepath

    Posted Thu December 08, 2016 02:39 AM

    Originally posted by: Ejay


    Hi John,

     

    Could you please indicate what TX version you are running ?

     

    EJay


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


  • 3.  Re: xmllib->VALIDATEEX log filepath

    Posted Thu December 08, 2016 02:49 AM

    Originally posted by: johnxp


    Version: 8.3.0.4 
    Build id: 13 

     


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


  • 4.  Re: xmllib->VALIDATEEX log filepath

    Posted Thu December 15, 2016 03:21 AM

    Originally posted by: paul.brett


    I think you're attempting to use the Resource Registry in a place where it is not designed to be used.

    Perhaps you could get the alias first in an earlier (temporary) output card, and then map the value directly?

    =resourcelib->GETRESOURCEALIAS("C:\IBM\WebSphereTX8.3\Resource.mrc","%logpath%")

    then

    =IF( xmllib->VALIDATEEX(PACKAGE(ISO_PAIN_001), "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd", LogPath:OutTemp1+"\pain.001.001.03.Err.log" ) != 0,
            FAIL("XML Validation Error. Please check the log for details.") )

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 5.  Re: xmllib->VALIDATEEX log filepath

    Posted Wed February 08, 2017 04:16 AM

    Originally posted by: johnxp


    Hi Paul, how can we use resourcelib->GetResourceAlias() without hardcoding the resource file path?


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


  • 6.  Re: xmllib->VALIDATEEX log filepath

    Posted Wed February 08, 2017 04:56 AM

    Originally posted by: paul.brett


    The path to the MRC file can be an object, reading the value from a dynamic file:

    =resourcelib->GETRESOURCEALIAS(ResourceRegistry,"%logpath%")

    Thank-you.

    Paul.

    Follow me on Twitter


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


  • 7.  Re: xmllib->VALIDATEEX log filepath

    Posted Wed February 08, 2017 09:02 PM

    Originally posted by: johnxp


    Hi Paul,

    Can you please advise more on how to make the MRC filepath as an object?

    Thanks.


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


  • 8.  Re: xmllib->VALIDATEEX log filepath

    Posted Thu February 09, 2017 05:02 AM

    Originally posted by: paul.brett


    Sure thing.  You create a new Input card, called 'ResourceRegistry' and use either the FILE adapter to read the value from a file, or the ECHO adapter, and hard-code the value in the adapter command line (although this really defeats the object, unless you override).

    Using the FILE adapter, the value is then dynamic and can be different across platforms.

    Thank-you.

    Paul.

    Follow me on Twitter


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