sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Built in Function for Testing Numeric Data

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Built in Function for Testing Numeric Data

    We want to Test numeric data in Our application program.We don't want to use indictor in this case .We want to use built in Error functionality of RPGIV. Can we have built in function for Testing numeric data which is having similar functionality of TESTN opcode used in RPG/400?


    Regards,
    Omkar Pradhan

  • #2
    Re: Built in Function for Testing Numeric Data

    Hi

    Take a look at:http://www.rpgiv.com/rpgivforum/view...14443416&NRL=8
    LP Zdenko

    Comment


    • #3
      Re: Built in Function for Testing Numeric Data

      Or, you could do this. Not the most efficient code, but simple and works. Note, however, that this allows a decimal point and blanks.


      MONITOR
      EVAL WorkField = %dec(Anyfield:9: )
      ON-ERROR
      ...... do whatever
      ENDMON

      Comment


      • #4
        Re: Built in Function for Testing Numeric Data

        PHP Code:
        ~
              
             
        C                   Eval      Pos = %Check'0123456789' SomeString )
             
        C                   If        Pos > *Zero
              
        Process information
             C                   
        EndIf 
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment


        • #5
          Re: Built in Function for Testing Numeric Data

          Originally posted by arrow483
          Or, you could do this. Not the most efficient code, but simple and works. Note, however, that this allows a decimal point and blanks.


          MONITOR
          ....
          Actually it should be pretty efficient because MONITOR is a relatively lightweight function. It doesn't add much overhead and it is probably a lot more efficient to do it this way than scanning for valid characters and then converting.

          Comment


          • #6
            Re: Built in Function for Testing Numeric Data

            @#%@#%@#%@#% Jamie... are you going to take that standing up?



            *** GOD I love this place... ***
            -Rick

            _____________________________

            Need a Managed File Transfer Solution -OR- iSeries Encryption?
            GoAnywhere and Crypto Complete by Linoma Software

            Comment


            • #7
              Re: Built in Function for Testing Numeric Data

              [QUOTE=FaStOnE]@#%@#%@#%@#% Jamie... are you going to take that standing up?

              QUOTE]

              Not Jamie. He always strikes back. Just the other day he was saying how someone out in Arizona had pissed him off and he was going to hack into their computer in the middle of the night and...
              The again maybe you're not suppose to know about that FastOne

              JUST KIDDING!!!!

              Comment

              sponsored links

              Collapse

              Working...
              X