Read Screen Data w/o Enter Key Being Pressed

pts.
Tags:
Application development
I have both simple (non-subfile) and subfile dds-created screens. Would like the users to be able to press F10=Save to save screen data, without needing to press the Enter key to capture the data first. (Edits automatically run immediately after control returned to pgm.) Is this even possible? Especially with subfiles??? Programming in COBOL. Any assistance GREATLY appreciated! Thanks!!

Answer Wiki

Thanks. We'll let you know when a new response is added.

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:  

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following