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.  GET function - Error return Code -6

    Posted 03/03/14 11:11 AM

    Originally posted by: ediX12HIPAA


    Hi,

    Please help.

    in WTX 8.2 old code, I have the rule coded like this to archive a file to a different directory:

    valid (GET("bat"," -t iarchive837v5.mtr -a iarchive837v5.log -cmd '%script_dir%copier.bat "+ mfdir Field:set2Run:Outwork+

    setMFname Field:set2Run:Outwork + " "+

    SUBSTITUTE (mfdir Field:set2Run:Outwork ,"merc_to_mf","archive\merc_to_mf") + setMFname Field:set2Run:Outwork),

    "Failed archiving 837 mainframe file from m2mf to data_archive - Error code: " + LASTERRORCODE( ) + " -- Message: " + LASTERRORMSG( )))

    WTX 8.2 ran fine, no issue.

    I am upgrading to WTX 8.4.0.3, same code as above, I have return code of "Error code: -6 -- Message: Error_executing_command".  I don't understand why.

    The "log" file told me return code of "1".  I attach both "trace" and "log" files here

    Currently, WTX 8.2 uses 32 bit.  WTX 8.4.0.3 is 64 bit Windows Server 2008 R2 Enterprise Service Pack 1

    Is it memory issue?  or something else?

    Please advise what was wrong with my code.

    Thanks.

    ediX12HIPAA


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


  • 2.  Re: GET function - Error return Code -6

    Posted 03/19/14 11:29 AM

    Originally posted by: paul.brett


    The first suspect is '%script_dir%'.  Have you verified that Resource Registry is working?

    Follow me on Twitter


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


  • 3.  Re: GET function - Error return Code -6

    Posted 04/30/14 02:17 PM

    Originally posted by: ediX12HIPAA


    Hi Paul,

    The resource registry is working.  In the Router.MRN, I had "script_dir" defined.  It seems that other variables in router.mrn are OK when I link to it, but not this "script_dir" (the same code which is my current production works in WTX 8.2.0.5, but not WTX 8.4.0.3 which I am working on the upgrade and found that this code does not work).

    This is how I defined the "script_dir" in the router.mrn

     <Resource>
        <Name>script_dir</Name>
        <Value encrypt="OFF" Server="test">d:\mercapp\script\</Value>
        <Value encrypt="OFF" Server="prod">d:\mercapp\script\</Value>
        <Value encrypt="OFF" Server="dev">d:\mercapp\script\</Value>
     

    Thanks.


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


  • 4.  Re: GET function - Error return Code -6

    Posted 05/06/14 05:18 AM

    Originally posted by: paul.brett


    You mention - I attach both "trace" and "log" files here.....

    ...but I see no attachments.  Please can you try again?

    What happens if you hard-code the rule:

    =valid (GET("bat"," -t iarchive837v5.mtr -a iarchive837v5.log -cmd ' d:\mercapp\script\ copier.bat "+ mfdir Field:set2Run:Outwork+

    setMFname Field:set2Run:Outwork + " "+

    SUBSTITUTE (mfdir Field:set2Run:Outwork ,"merc_to_mf","archive\merc_to_mf") + setMFname Field:set2Run:Outwork),

    "Failed archiving 837 mainframe file from m2mf to data_archive - Error code: " + LASTERRORCODE( ) + " -- Message: " + LASTERRORMSG( )))

    Finally, I note that the -CMD has a single opening quote, but no matching closing quote.  What happens if you add this in?

    Thank-you.

    Paul.

    Follow me on Twitter

     

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