Adding a Functioon Key to a program


Well Known Member

I've done this before, but it's been a while and I can't remember what step I am forgetting to do.

I am trying to modify a JDE program to allow the operator to use a Function Key to call another program. There aren't any changes to the video, just to the RPG pgm.

I added the logic to the program to execute the call command if this function key is pressed, and enabled the function key via the function key definition (7/G90). But when I try to test the program, I get the "Invalid Function Key Pressed" error and have to hit the reset key to unlock the keyboard. But when I press F24, the verbiage for the new function key is displayed. I checked the video's dspf source and see that the function key is defined, so what am I forgetting to do?



Active Member
What release you are in?
Please check the following:
- did you compile it successfully?
Vocabulary Overrides:
- in function key definitions, is func.key/opt mapped correctly to #FIELD
and the include option=Y?
- did you add the new functions code to S00EX?
- is @@AID = #FIELD (not the func.key) in S00EX?

If all the above is correct, make sure your RPG was compiled with DSPF

Emad Banoub
Pasadena, CA
A7.3 CU 12/X3 - Xe SP 13.0

Diana_Apple <[email protected]> on 07/16/2001 10:54:08 AM


Well Known Member

Thanks for your reply.

It turned out that I forgot to exit the S00EX subroutine after I issued the call stmt when this function key was pressed. Something simple, but I was sure there was a JDE function I had failed to do.

I am in release A7.3 cum 6