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.  EDI GS05 Time Conversion

    Posted 06/12/14 12:46 PM

    Originally posted by: ICS_User_Shane


    Hey guys, i have an issue trying to convert my GS05 time from HH:MM:SS to HH:MM.  I am using the standard Type Tree from ANSI for 4010.  The description says the Class Type and Format should allow for HH:MM.

    I have tried the following:

    =TODATETIME(CURRENTTIME(), "{HH:MM}")

    =TEXTTOTIME(FROMDATETIME(CURRENTTIME(), "{HH:MM}"))

    Each time my MTR file shows: 

    11:33:44.765  Jun 12 2014
    (Offset 972: Map Number 7 (%MapGS), DI 000000DF:)
    Building TYPE X'00F1' (Time Element V4010 ANSI EDI).
     
    11:33:44.765  Jun 12 2014
    (Offset 972: Map Number 7 (%MapGS), DI 000000DF:)
    TYPE X'0000' (Time Element V4010 ANSI EDI) has been built. ('0|LT|2200-126|||')
     
    11:33:44.765  Jun 12 2014
    (Offset 972: Map Number 7 (%MapGS), DI 000000DF:)
    The rule for TYPE X'00F1' (Time Element V4010 ANSI EDI) evaluated to NONE.

    The 0|LT|2200-126||| value actually comes from a different record format down at the Line level.  Not sure how WTX managed to do that.

     

    Any help would be appreciated.

    Shane 


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


  • 2.  Re: EDI GS05 Time Conversion

    Posted 06/13/14 03:28 AM

    Originally posted by: paul.brett


    From what version of the WTX X12 Pack are you using this Typetree?  In the Typetree I have, 'Time Element V4010 ANSI EDI' is a category, and cannot be used as an output object.

    When I use 'Short Other Time Element V4010 ANSI EDI', and the rule:

    =CURRENTTIME()

    ....I get the correct output : '0831'

    Thanks

    Paul

    Follow me on Twitter


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


  • 3.  Re: EDI GS05 Time Conversion

    Posted 06/13/14 03:50 AM

    Originally posted by: paul.brett


    I have found a newer version of the Typetree (from IBM WebSphere Transformation Extender Pack for X12 v2.8.1.2) and it shows 'Time Element V4010 ANSI EDI' as an object.

    The output of this object is determined by a combination of the object properties, and the rule.  The properties are defined thus:

    <ITEM SimpleTypeName="Time" CategoryOrItemParent="Element V4010 ANSI EDI" Description="Time as HHMM or HHMMSS or HHMMSSDD(337 V4010)" partition="NO" OrderSubtypes="ASCENDING"><CharDatetime><CharDateTimeFormatString>{HH24MM[SS[1-2]]}</CharDateTimeFormatString>
    <PadText Justify="LEFT" ApplyPad="ANYCONTEXT"><PadValue>&lt;SP&gt;</PadValue>
    <PaddedToMinContent CountsTowardsMinContent="YES" PadUsing="BYTES"/>
    </PadText>
    <Western CharSet="NATIVE"/>
    <ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
    </CharDatetime>
    </ITEM>

    ...and a rule of:

    =TEXTTOTIME(LEFT(TEXT(CURRENTTIME()),2)+MID(TEXT(CURRENTTIME()),4,2))

    ...should get you the result you desire.

    Let us know how that goes.

    Thanks

    Paul

    Follow me on Twitter


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


  • 4.  Re: EDI GS05 Time Conversion

    Posted 06/13/14 03:59 AM
      |   view attached

    Originally posted by: paul.brett


    Files....

    Thanks

    Paul

    Follow me on Twitter


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

    Attachment(s)

    zip
    4010.zip   1 KB 1 version


  • 5.  Re: EDI GS05 Time Conversion

    Posted 06/13/14 04:59 AM

    Originally posted by: paul.brett


    Rule :

    =TEXTTOTIME(FROMDATETIME(CURRENTTIME(), "{HH24MM}"))

    ...would also work.

    Note that HH is NOT a valid format.  HH12 or HH24 is.  The colon also needs to be removed).

    Thanks

    Paul

    Follow me on Twitter


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


  • 6.  Re: EDI GS05 Time Conversion

    Posted 06/13/14 09:05 AM

    Originally posted by: ICS_User_Shane


    Hey Guys,

     

    Thanks so much for the input.  After all this, i shut down the 8.1 mapper tool and restarted the dev server.  I tried my =TEXTTOTIME(FROMDATETIME(CURRENTTIME(), "{HH24MM}")) command and low and behold it worked.

    Our enterprise WTX folks have plans on upgrading our division to 8.4 this summer.

    Sometimes this thing just gets so buggy.


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