Test for Valid Whole Number
What I need is a test that what is entered only contains the digits 0123456789. Anybody have a nice quick way to test for a valid whole number between 1 and 9? Testing for values 1 and 9 are immaterial to this question and are already tested. I thought DATATYPE(number,W) would do it but 100E2 and 100.0 are valid. DATATYPE HEX and ALPHANUMERIC allow for 100E2
Re: Test for Valid Whole Number
Try if verify(number, '0123456789') = 0 then it is good Else it is bad Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf Of James Stracka (DHL US) Sent: Wednesday, May 06, 2009 10:37 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Test for Valid Whole Number What I need is a test that what is entered only contains the digits 0123456789. Anybody have a nice quick way to test for a valid whole number between 1 and 9? Testing for values 1 and 9 are immaterial to this question and are already tested. I thought DATATYPE(number,W) would do it but 100E2 and 100.0 are valid. DATATYPE HEX and ALPHANUMERIC allow for 100E2
Re: Test for Valid Whole Number
Perfect! Thank you. -Original Message- From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf Of Schuh, Richard Sent: Wednesday, May 06, 2009 10:40 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Test for Valid Whole Number Try if verify(number, '0123456789') = 0 then it is good Else it is bad Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf Of James Stracka (DHL US) Sent: Wednesday, May 06, 2009 10:37 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Test for Valid Whole Number What I need is a test that what is entered only contains the digits 0123456789. Anybody have a nice quick way to test for a valid whole number between 1 and 9? Testing for values 1 and 9 are immaterial to this question and are already tested. I thought DATATYPE(number,W) would do it but 100E2 and 100.0 are valid. DATATYPE HEX and ALPHANUMERIC allow for 100E2
Re: Test for Valid Whole Number
Regardless of the number digits, this should work: If verify(checkme,'0123456789')0 the say 'The value was not all numeric.' Mike Walter Hewitt Associates James Stracka (DHL US) james.stra...@dhl.com Sent by: The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU 05/06/2009 12:37 PM Please respond to The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU To IBMVM@LISTSERV.UARK.EDU cc Subject Test for Valid Whole Number What I need is a test that what is entered only contains the digits 0123456789. Anybody have a nice quick way to test for a valid whole number between 1 and 9? Testing for values 1 and 9 are immaterial to this question and are already tested. I thought DATATYPE(number,W) would do it but 100E2 and 100.0 are valid. DATATYPE HEX and ALPHANUMERIC allow for 100E2 The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.