× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



SDA used to have a flag for mandatory entry (ME) in the S/36 days but I don't
recall seeing it in recent years.

----- Original Message -----
From: "Douglas Handy" <dhandy1@bellsouth.net>
To: <rpg400-l@midrange.com>
Sent: Wednesday, April 10, 2002 12:15 AM
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.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.