× 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.




On Friday, March 19, 2004, at 12:49 AM, simafrog wrote:


Simon, Not to beat a dead horse, but CHECK AB, elicits the message (On a blank), "invalid Item", which is not the same as, "You must enter something please". Invalid item is because there are no blanks as items codes. I would want it to be more of a ME, Mandatory Enter message, but if you can't have both, It will probably do.

Then you need to state your requirements better. Allowing blanks to be keyed but not accepting blanks are mutually exclusive conditions and you must resolve the conflict.


First it seemed you wanted to ensure greater than A and not blank. COMP(GT 'A') satisfies that requirement.

Then it seemed you wanted a better error message. Adding CHKMSGID satisfies that requirement.

Then it seemed you wanted greater than A but allow blanks. COMP(GT 'A') CHECK(AB) satisfies that requirement.

Now it seems you want greater than A and not blank and mandatory entry. COMP(GT 'A') CHECK(ME) DSPATR(MDT) satisfies that requirement. Pressing Enter will show "Value must be greater than 'A'". Pressing Field Exit will show "Mandatory enter field must have data entered."

If you don't like that result then you'll have to do the work in your HLL. Since it seems your application doesn't want blanks ('cause blank is not a valid item) and the "invalid item" message is probably coming from your HLL as a result of CHAINing to the item file with a blank key then you already have a mechanism for supplying the desired message to the user. Since I doubt you are sending a message--more likely just setting an indicator for a DDS error message--all you have to do is define a new error message in the DDS, assign it another indicator, and check for a blank key in your HLL prior to checking the item file. If blank then turn on the appropriate indicator and redisplay the screen.

And the lesson is: You cannot do all data validation in DDS. Indeed there is a valid argument that you shouldn't do any validation in DDS. However, reading the DDS reference for the data validation keywords and writing some experimental code would have given you a useful learning experience and you would probably have clarified your requirements and finished the task long before now.

Last word from me on DDS-101 questions (and after a wander around the ziplip.com web site my sus-filter is active).

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.