|
Thanks Doug, Richard. We'll give the alpha field a try. > -----Original Message----- > From: Douglas Handy [SMTP:dhandy1@bellsouth.net] > Sent: Tuesday, April 09, 2002 12:16 PM > To: rpg400-l@midrange.com > Subject: Re: FW: Keyword on DSPF entry field > > Nelson, > > >C'mon, guys. This is a real production problem we have, and I've had no > >responses from anyone, yet > > Probably because I don't think it can be done in the manner you hope.. > > >We need to be able to prevent users from tabbing or arrowing out of a > >numeric field without first doing a field exit. There must be some > standard > >way of preventing this error. > > I do have a standard way of preventing the error -- I don't use numeric > fields, > and gave up on them even back on the S/36. Instead I use character fields > from > the program viewpoint, so that the WS controller and/or the OS service > routines > do not interpret the contents. > > This lets me perform my own character to numeric conversions (in a service > program on the 400, it was monolithic standardized subroutine on the > S/36), and > handle left justified fields correctly and issue errors when there are > embedded > blanks. > > As has often been discussed here, don't try to use C's atoi() function for > this. > You need your own routine -- like what Barbara Morris has often posted -- > so you > can correctly interpret the numbers and issues errors when the contents is > ambigous. > > Doug > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. ************************************************************************************************************************************************************************************************************ This message originates from Lincare Holdings Inc. It contains information which maybe confidential or privileged and is intended only for the individual or entity named above. It is prohibited for anyone else to disclose, copy, distribute or use the contents of this message. All personal messages express views solely of the sender, which are not to be attributed to Lincare Holdings Inc., and may not be copied or distributed without this disclaimer. If you received this message in error, please notify us immediately at MailAdmin@lincare.com or (800) 284-2006. ************************************************************************************************************************************************************************************************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.