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.  PUT function error

    Posted 04/20/10 01:09 AM

    Originally posted by: SBurra


    Appreciate your replies to the question below:

    (1) I have a Router Map which Routes 2 Files based on the given criteria (code).

    (2)I have an input file which takes BAD FILE as input and my output card has the following RULE:

    =IF(FileCode HeaderSegmentGroup:HeaderSegmentRecord:Input_Router="OFF", RUN("OfficeValidate.mmc", ECHOIN(1,PACKAGE(Input_Router))), RUN("ModifyDelimiter.mmc", ECHOIN(1, PACKAGE(Input_Router))))
    • This above file outputs a 0 when Good File is passed to the input file and a 8 if Bad file is passed

    (3) Now, I want to capture the BAD DATA in a file (_a different file_) and hence I created a 2nd output card, which has the RULE as follows:

    =IF(TextItem Element[1]:Output_Router != "0", PUT("FILE", PACKAGE(Input_Router),"Error_" + TEXT(CURRENTDATETIME()) + ".txt"), NONE)

    (4) When I build the Map now, it builds succesfully and there are 2 output files (as given in the respective Output card file name fields).

    But my PUT function above, is not creating a file called *Error_DATATIME.txt*??? Why is it so? Am I doing anything wrong here?

    Appreciate your replies with a good suggestion.. BTW - I'm using Design Studio 8.2 for building my Maps and Type Trees (not sure if you require this, but am giving it to you anyways)

    Venkata C Burra
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: PUT function error

    Posted 04/20/10 05:38 AM

    Originally posted by: TimUK


    The PUT command on its own looks ok.
    Try putting a fail command around it
    VALID(PUT("FILE", PACKAGE(Input_Router),"Error_" + TEXT(CURRENTDATETIME()) + ".txt"), lasterrormsg() )

    Is it possible that
    TextItem Element[1]:Output_Router != "0" is not true? and therefore the PUT is not being processed.

    Try using a fixed file name to start with.

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


  • 3.  Re: PUT function error

    Posted 04/20/10 03:55 PM

    Originally posted by: SystemAdmin


    The syntax of PUT function is incorrect.

    PUT ( adapter_alias , adapter_command , data_to_send_to_adapter )

    Use as below & it should work:
    =IF(TextItem Element[1]:Output_Router != "0", PUT("FILE","Error_" + TEXT(CURRENTDATETIME()) + ".txt",PACKAGE(Input_Router)), NONE)
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: PUT function error

    Posted 04/21/10 04:23 AM

    Originally posted by: TimUK


    Next time I'll RTFM for the correct syntax!
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: PUT function error

    Posted 04/21/10 04:29 AM

    Originally posted by: SBurra


    Hey TimUK, Thanks for the advise. I'll definitely RTFM next time for the syntax..

    Venkata C Burra
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: PUT function error

    Posted 04/20/10 10:54 PM

    Originally posted by: SBurra


    Thank you TimUK and ASK for your wonderful suggestion.. It worked perfectly fine..

    You guys are just wonderful.. Appreciate that..

    Venkata C Burra
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender