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.  Fixed Record…

    Posted 03/17/09 10:36 AM

    Originally posted by: repanzer


    It’s been a while since I had to define a flat file, but either something escapes me, or I have to use a component rule, but I don’t want to.

    I have an input file with one record and that record has 2 fixed fields. The first field is a 5 byte state field, and should always contain at least 2 bytes of data. So not only is it required, it has to be at least 2 bytes long. I define it as 2 min/5 max bytes, pad to 5 spaces. If I put an “A” in there, it fails, because it’s less then two bytes, but if I put in all spaces, it passes, even though I have it as min 2 bytes.

    I believe it's because it didn’t find any data, so it doesn’t care that it’s min 2 bytes, but it’s a required field and all pad characters should equate to a failure.

    The only way I can find is to put $>” “ as a component rule, but is that really necessary? Is there no way for it to treat all pad characters as required and have the type or data invalid by just defining the type properties in type designer?

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


  • 2.  Re: Fixed Record…

    Posted 03/18/09 06:34 AM
      |   view attached

    Originally posted by: Yusuf@BOE


    I found this a bit strange so gave it a try myself. With the attached tree it appears to work the way it should.

    Zero or one character in either field and the map fails minimum size requirements.

    Let me know if I've misunderstood.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)



  • 3.  Re: Fixed Record…

    Posted 03/18/09 09:05 AM

    Originally posted by: repanzer


    Thanks for giving it a shot.

    That’s almost it; what I need to do is make the first field required, so if it’s all pad characters, there’s no data, and treat it as invalid. The only way I can do it is to put a component rule to say $>” “ (the first field must be greater then spaces). I wanted to know if there were a way through the properties to treat all pad characters as “not found of F1 type”, because F1 is required. The way I’m doing may be the correct way, I just could have sworn it was possible through properties.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Fixed Record…

    Posted 03/18/09 09:31 AM

    Originally posted by: Yusuf@BOE


    If you pad to Min Content rather than Fixed Size, then you get the property 'CountsTowardsMinContent', but I don't think that helps you as it implies the field is not a fixed size.

    When I run it and the first field is all pad characters (spaces), it does fail.

    So possibly its behaving differently on your version of TX or O/S.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange