Unix Technical Forum

Re: Not a number check in Informix 4gl

This is a discussion on Re: Not a number check in Informix 4gl within the Informix forums, part of the Database Server Software category; --> malcolm.iiug wrote: > Why not copy the input string to a numeric data type and then copy the > ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:53 PM
Mark D. Stock
 
Posts: n/a
Default Re: Not a number check in Informix 4gl


malcolm.iiug wrote:

> Why not copy the input string to a numeric data type and then copy the
> numeric data type to a string with a USING clause. If the input string is
> equal to the result string then the data is numeric.
>
> I used to do this all the time in 3GLs.


In 4GL, if you can copy the value to a numeric data type without an error,
then your task is complete. ;-)

The trick is switching on the correct level of error trapping.

Cheers,
--
Mark.

+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+

sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:40 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com