First you have to declare your F10 key in the DDS as a CF10 key and not as a CA10 key. (CFxx acts as an enter at the same time – capture input etc.)
In Cobol you have to declare in your screen handling section – the same as where you handle the enter key – the routine to print the screen. Something like this :
WRITE SUBFILE WS-RECORDS FROM C01-O FORMAT IS “C01”.
SCRN2-10.
READ AUTIPLF22 INTO C01-I FORMAT IS “C01”.
*…………….COMMANDO-TOETSEN……………….
IF CMD03 OR CMD12
GO TO EXIT-PROGRAM.
IF CMD10
CALL “AUTIPL11C”
CANCEL “AUTIPL11C”
GO TO EXIT-PROGRAM.
PERFORM RESTORE-PARM.
PERFORM SC02.
This is an extract out of one of my cobol programs. The perform SC02 does the verifycation of the rest of the input on the screen at the same time.
Hope this gives you an idea how to handle it. If not – feel free to contact me.
Discuss This Question: