IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
Expand all | Collapse all

Using PUT function need output files

  • 1.  Using PUT function need output files

    Posted Wed December 16, 2009 11:56 AM

    Originally posted by: rajesh143


    hi well can any one help how to use put function

    my question is i have a text with name, roll, age so i want the age whose are equal i should get in one text file(output1) and
    now what i want is the age item with 10 should i come in output file (output1) and age 9 should i in output file using put function

    i got it using 2 output cards

    but i want it put functions

    anyone can help me out
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Using PUT function need output files

    Posted Thu December 17, 2009 04:33 AM

    Originally posted by: ChB


    Hello Rajesh,

    I'm not sure, if I understand your problem. I guess, you understand the syntax of the put function, do you? PUT("file","filename.txt","Whatever You want to Write")

    As you already have your two output cards, which are sorting, extracting and merging as required, I suggest to reuse them but set the output adapter to sink.

    Create a third output card and there you do a

    PUT("file","filename1.txt",PACKAGE(output1)) and a
    PUT("file","filename2.txt",PACKAGE(output2))

    Is this, what you are looking for?

    Best regards

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


  • 3.  Re: Using PUT function need output files

    Posted Thu December 17, 2009 04:37 AM

    Originally posted by: SystemAdmin


    Hi Rajesh,

    If I got Ur qn correctly, what U need is,

    U have an input file with records - Name,Roll,age

    And U want to segregate the records with same age to 1 file... So if there are 5 different age, 5 output files will be generated. Each file will have the records with that age.

    U can achieve this as follows:

    Step 1: Get the list of different ages (U can use UNIQUE function here to get the distinct values of age)

    Step2: Call a functional map F_AGE (Age from previous step, Input File)
    The functional map will be called for each occurrence of the age.

    Step 3: Inside the functional Map, EXTRACT the records for that age, and Use PUT function to write these records.

    Please let me know if you need further clarification.

    Thanks,
    Deepthi
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender