How does VLDCMDKEY work in AS/400

90 pts.
Tags:
AS/400
AS/400 Subfiles
RPG
I have display file with load all subfile and using function key 'F3= Exit' ,'F5=Refresh' and 'F9=Print'. I want to preventing lock of screen if user press any invalid function key(anything except F3,F5,F9).Could any one suggest me any solution? I have used VLDCMDKEY at display file but in RPG ,when invalid key is pressed, screen get locked and it's not read the next line after EXFMT as record get locked .so, it's not entering to the desired condition and not showing error msg 'Function key not allowed'.
Actually I want a exact functionality as AS/400 screen does when any invalid function key is pressed. It's shows message 'Function key not allowed'. I want to do the same thing with my program.


Software/Hardware used:
AS/400
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • CharlieBrowne
    If you go to this link and go to page 393 you will get a full description of how VLDCMDKEY is used in an RPG program.

    http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/info/db2/rbafpmst.pdf

    62,385 pointsBadges:
    report
  • nabamita
    Thanks for the response. But it's not enough to clear my query.
    90 pointsBadges:
    report
  • CharlieBrowne
    Then you will need to do a check un your program for every possible function key to see if it was pressed and if was not a valid one, then you can display your message.
    62,385 pointsBadges:
    report
  • philpl1jb

    I would guess you will have to declare all function keys as valid in the record or file by having declarations for each. Then your program will receive the selection and can determine the appropriate action or message.

    CF01(01 )

    CF02(02)

    CA03(03)

    PAGEDOWN(78)
    PAGEUP(79)

    54,090 pointsBadges:
    report
  • ToddN2000
    What command keys are defined in your DDS? DO you have others defined that are not being used? You could test if if any of the 3 command keys were pressed to do that function otherwise loop back to the display.
    133,750 pointsBadges:
    report
  • Jjk
    For the keys not being used in the DDS you can add the as CAxx(99), CA04(99) thru CA12(99) and your screen will not lock up if any of the those other keys are pressed.
    35 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: