TechTalk: Required Field Exit

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Required Field Exit

From: James Harr

To: All

Does anyone know the replacement for the S/36 required field exit? I've tried 'CHECK(FE)' but it still allows the user to tab out of the field. Any help would be appreciated.

From: Pete Hall

To: James Harr

I believe CHECK(FE) is the correct translation for S/36 required field exit. Actually, you could tab out of those guys on the S/36 too. The AS/400 handles the data transfer to the program a little differently though. Even if you don't right-justify a numeric value in a display file field, it still seems to magically get returned correctly somehow. Are you having some specific problem?

From: James Harr

To: Pete Hall

The problem is that though the field is used for input/output, numbers are passed to the field right-adjusted. If the user enters a number and tabs out, the field is returned to the program with the original value to the right, the entered value to the left, and everything in between padded with zeros by the program. Quite a frustrating problem!

From: Pete Hall

To: James Harr

I see what you mean. It may be that the best you can do is educate your users. Possibly you could define the display field with an M shift (decimal data returned in a character field), with a CHECK(RZ), and then do a TESTN on the returned value, but that would require handling the error within the application. I don't know how you can get the system to automatically trap it.

From: James Harr

To: Pete Hall

What I'll probably do is compare the returned value to the original, and send a soft message if the difference is greater than a certain percent. It's a shame DDS can't help me more.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$