webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How very max length of characters/numerical chars?

  • 1.  How very max length of characters/numerical chars?

    Posted Sat February 18, 2006 04:51 PM

    Newbie here needs some help, that I’m sure is a simple matter to you experts.

    What do I need to do in WM 6.1 developer in order to do the following:

    • Verify that a field contains a maximum of 14 characters
    • Verify that all the characters in this same field are numerical

    If the above criteria is met, assign the field to a variable.
    If any of the above criteria is not met, assign a null value to a variable.

    Thanks.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How very max length of characters/numerical chars?

    Posted Sat February 18, 2006 05:10 PM

    There are lots of great services in this document, including:

    pub.string:length
    pub.string:numericFormat
    and many more!

    You could get the length of the variable and compare it to your maximum.

    There is no standard built-in service to check if a value is numeric, but you can write a java service to do that. Or if you have the PSUtilities package, there is an isNumeric service in there.
    OR

    If you want to throw an error (or catch one and set your value to null) if the value is not numeric, you can call the numericFormat service.

    -Cort


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: How very max length of characters/numerical chars?

    Posted Sun February 19, 2006 01:25 AM

    Another option for checking numerice value or not is try using Regular Expressions…Please see the ISDeveloperGuide.pdf for better understanding.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: How very max length of characters/numerical chars?

    Posted Sun February 19, 2006 11:15 AM

    PSUtilities.string:isNumeric may help.
    nancy


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services