45 pts.
Q:
How to restrict "Enter key' on the AS/400 display file.
Is there any way to restrict the enter key on the display file like other function key. Ex If you did't configure F1 key the Display file If will not allow you to Access that key while doing the Exfmt.
ASKED: Jul 1 2009  3:05 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
1245 pts.
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • Bookmark and Share
Can you be more specific on why you would need the enter key restricted ?

EXFMT = WRITE followed by a READ

So if you do just a WRITE - you are basically displaying the record format without accepting any input.

If the user presses any key, I suppose you could retrieve the status (Exception/Error Codes) from the INFDS to determine how you want to proceed next.

I have not done this before, so not sure if this will work or not.
Last Answered: Jul 1 2009  3:53 PM GMT by Satsho   1245 pts.
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Splat   1260 pts.  |   Jul 3 2009  2:39PM GMT

Another option would be to use the attention indicator byte (pos. 369 - 369 (character) in the workstation INFDS) to determine the function key pressed. Enter is defined as x’F1′ - look for that and disallow any processing. This would let you keep other function keys on the screen active. You can even check for Auto-Enter, x’3F’

I like the attention indicator byte - I haven’t bothered attaching an indicator to a function key in ages. I just compare the field defined on the INFDS to pre-defined constants. You can find the definitions of the returned values here.