Description:
Normally EDTRCD or DSPRCD functions are called with fully restricted keys and the Bypass key screen function option set to Y. In some situations this is not possible but you do not want the key screen to be displayed with incomplete keys. This document describes a neat technique to totally bypass the key screen no matter how many keys are supplied.
Solution:
The technique involves adding a new condition T for Totally bypass key screen to the model's system field *Bypass key screen. The field*Bypass key screen is added to the file *Program data. In the user points EDTRCD USER: Initialize key screen or DSPRCD USER: Load key screen add a *MOVE to set PGM context *Bypass key screen to CND Totally bypass key screen.
Add a new CND Totally bypass key screen value T to 2E system field *Bypass key screen
<Please see attached file for image>
Add a new Has relation for *Bypass key screen at sequence 999 to file *Program data
This means that the field can be directly used in PGM context within an Action Diagram without the need for EXCUSRSRC
<Please see attached file for image>
Simple test file
<Please see attached file for image>
My example EDTRCD on the test file has this parameter…
<Please see attached file for image>
…and these functions options
<Please see attached file for image>
In its Action Diagram
<Please see attached file for image>
Call the program with blank input key parameter
<Please see attached file for image>
Detail screen with key supplied by function
<Please see attached file for image>