Totally bypassing the key screen in EDTRCD or DSPRCD

Document ID : KB000020067
Last Modified Date : 14/02/2018
Show Technical Document Details


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.


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

Figure 1

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

Figure 2

Simple test file

Figure 3

My example EDTRCD on the test file has this parameter…

Figure 4

…and these functions options

Figure 5

In its Action Diagram

Figure 6

Call the program with blank input key parameter

Figure 7

Detail screen with key supplied by function

Figure 8