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.  SORTUP Function

    Posted 07/10/08 05:05 PM

    Originally posted by: Vana


    Hi,
    I have the data as given below for Student Group : StudNum(Number) and StudName(Char)
    123*aaa
    6*bbb
    51*ccc

    When I use the SORTUP Function, the o/p is coming as follows
    123*aaa
    51*ccc
    6*bbb

    I suppose it is sorting according to the character.

    Could someone please tell me what I have missed.

    Thanks in advance.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: SORTUP Function

    Posted 07/11/08 05:07 AM

    Originally posted by: SystemAdmin


    It sorts on the first character. If you want to sort on the letters (aaa, bbb, etc) you need to restructure the format for sorting and then structure it back again to your desired format.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: SORTUP Function

    Posted 07/11/08 09:27 AM

    Originally posted by: janhess


    It sorts on the whole string.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: SORTUP Function

    Posted 07/11/08 12:47 PM

    Originally posted by: Vana


    I want it to sort in the ascending order of the StudNum.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: SORTUP Function

    Posted 07/14/08 12:53 PM

    Originally posted by: SystemAdmin


    You need to use a functional map.

    File(1:1)=SortOnStudNum(SORTUP(UNIQUE(StudNum:Record:File)), InputFile)
    In the resulting Functional Map:
    Record(1:s)= Extract(Record:InputFile, StudNum:Record:InputFile = SortedStudNum)

    This assumes your type tree is something like:
    File=Records(1:s)
    Record=StudNum(1:1)
    StudName(1:1)
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 6.  Re: SORTUP Function

    Posted 07/15/08 02:39 PM

    Originally posted by: SystemAdmin


    As far as I can recall, sorting in Datastage requires a lot of resources. If you can avoid it by have the application before or after your map do the sort, I would suggest it.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 7.  Re: SORTUP Function

    Posted 07/15/08 04:26 PM

    Originally posted by: NancyR


    Maybe I'm missing something here, but couldn't you pad each StudNum with leading zeroes using FILLLEFT and then sort? You would need to know the maximum number of digits for the StudNum (or be able to take a good guess)to decide what length to pad to.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 8.  Re: SORTUP Function

    Posted 07/15/08 06:23 PM

    Originally posted by: Vana


    Thank you Nancy. I am able to get the sorted output when I have fixed the length of the StudNum field and padded it with either 'zero' or 'space'.
    I also see that if you donot fix the length and pad it, it is not going to sort. Is this a limitation one faces with the SortUp / SortDown function.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 9.  Re: SORTUP Function

    Posted 07/16/08 08:04 AM

    Originally posted by: NancyR


    SORTUP does an ASCII sort. Since the first byte of data for all three numbers in your example have different values, it sorts based on that value.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 10.  Re: SORTUP Function

    Posted 07/16/08 09:21 AM