Description:
This document deals in detail with the workings and limitations of EDTRCD2, EDTRCD3, DSPRCD2 and DSPRCD3 function types with regards to initialization of fields in the DTL, 2ND and 3RD contexts. It also notes differences between the COBOL and RPG implementations.
Solution:
The Working and Limitations of EDTRCD2, EDTRCD3, DSPRCD2 and DSPRCD3 device functions
The EDTRCD2/EDTRCD3/DSPRCD2/DSPRCD3 device functions behave, as one might expect, when there is no involvement of access path field(s) initialization, under either the *CHANGE or *ADD modes. The description of the functions within the manual holds good in this scenario. In the *CHANGE mode, the record details are retrieved and displayed correctly in separate panels, as per the device design. In the *ADD mode, the record details entered are obtained correctly from the separate panels and the record is created.
A summary of the EDTRCD2/DSPRCD2 device function behavior, when no initializations are involved, is given below.
Function Name | Generation Language | Mode of field(s) in DTL screen | Mode of field(s) in 2ND screen | Mode of Program | Limitation Exists (Y/N) | Remarks on Limitations |
EDTRCD2 | COBOL/ILE COBOL | I/H/O | I/H/O | *ADD/*CHANGE | N | The Function behaves as desired. |
RPG/ILE RPG | I/H/O | I/H/O | *ADD/*CHANGE | N | The Function behaves as desired. | |
DSPRCD2 | COBOL/ILE COBOL | I/H/O | I/H/O | *DISPLAY | N | The Function behaves as desired. |
RPG/ILE RPG | I/H/O | I/H/O | *DISPLAY | N | The Function behaves as desired. |
A summary of the EDTRCD3/DSPRCD3 device function behavior, when no initializations are involved, is given below.
Function Name | Generation Language | Mode of field(s) in DTL screen | Mode of field(s) in 2ND screen | Mode of field(s) in 3RD screen | Mode of Program | Limitation Exists (Y/N) | Remarks on Limitations |
EDTRCD3 | COBOL/ILE COBOL | I/H/O | I/H/O | I/H/O | *ADD/*CHANGE | N | The Function behaves as desired. |
RPG/ILE RPG | I/H/O | I/H/O | I/H/O | *ADD/*CHANGE | N | The Function behaves as desired. | |
DSPRCD3 | COBOL/ILE COBOL | I/H/O | I/H/O | I/H/O | *DISPLAY | N | The Function behaves as desired. |
RPG/ILE RPG | I/H/O | I/H/O | I/H/O | *DISPLAY | N | The Function behaves as desired. |
However, limitations exist when context based initialization of access path field(s) in Detail Panel 1 (DTL)/Detail Panel 2 (2ND)/Detail Panel 3 (3RD) contexts, is carried out, irrespective of the *CHANGE or *ADD modes. The limitations that come up are dependent on both the function and the language that is used for generating the function. The function behavior, based on the function and the generation language being used, is given below.
EDTRCD2 Device Function
DSPRCD2 Device Function
A summary of the EDTRCD2/DSPRCD2 device function behavior, when context initializations are involved, is given below.
Function Name | Generation Language | Mode of field(s) in DTL screen | Mode of field(s) in 2ND screen | Mode of Program | DTL Initialization done correctly? (Y/N) | 2ND Initialization done correctly? (Y/N) | Limitation Exists (Y/N) | Remarks on Limitations |
EDTRCD2 | COBOL/ILE COBOL | I/H | I/H/O | *ADD/*CHANGE | Y | N | Y | The limitation is with 2ND ctx initialization. DTL ctx initialization/Detail Panel 1 value if modified, is carried forward to Detail Panel 2, overwriting any 2ND ctx initialization, for related field(s). |
COBOL/ILE COBOL | O | I/H | *ADD/*CHANGE | N | Y | Y | The limitation is with DTL ctx initialization. DTL and 2ND ctx initializations are retained correctly on both panels on first time display. However, on a subsequent page up, the DTL ctx initialization on Detail Panel 1 is overwritten with 2ND ctx initialization/Detail Panel 2 value(s) if modified, for related field(s). | |
COBOL/ILE COBOL | O | O | *ADD/*CHANGE | Y | Y | N | The Function behaves as desired. | |
RPG/ILE RPG | I/H/O | I/H/O | *ADD/*CHANGE | N | Y | Y | The limitation is with DTL ctx initialization. 2ND ctx initialization is retained on Detail Panel 1, overwriting any DTL ctx initialization, for related field(s). | |
DSPRCD2 | COBOL/ILE COBOL | O | O | *DISPLAY | Y | Y | N | The Function behaves as desired. |
RPG/ILE RPG | O | O | *DISPLAY | N | Y | Y | The limitation is with DTL ctx initialization. 2ND ctx initialization is retained on Detail Panel 1, overwriting any DTL ctx initialization, for related field(s). |
EDTRCD3 Device Function
DSPRCD3 Device Function
A summary of the EDTRCD3/DSPRCD3 device function behavior, when context initializations are involved, is given below.
Function Name | Generation Language | Mode of field(s) | Mode of field(s) | Mode of field(s) | Mode of Program | DTL Initialization done | 2ND Initialization done | 3RD Initialization done | Limitation Exists (Y/N) | Remarks on Limitations |
EDTRCD3 | COBOL/ILE COBOL | I/H | I/H/O | I/H/O | *ADD/*CHANGE | Y | N | N | Y | The limitation is with 2ND/3RD ctx initializations. DTL ctx initialization/Detail Panel 1 value(s) if modified, is carried forward to Detail Panel 2 and Detail Panel 3, overwriting any 2ND/3RD ctx related initialization, for related field(s). |
COBOL/ILE COBOL | O | I/H | I/H/O | *ADD/*CHANGE | Y | Y | N | Y | The limitation is with 3RD ctx initialization. DTL and 2ND ctx initializations are retained correctly on Detail Panel 1 and Detail Panel 2 on first time display. However, 2ND ctx initialization/Detail Panel 2 value(s) if modified, is carried forward to Detail Panel 3, overwriting any 3RD ctx initialization, for related field(s). | |
COBOL/ILE COBOL | O | O | I/H/O | *ADD/*CHANGE | N | N | Y | Y | The limitation is with DTL/2ND ctx initialization. DTL, 2ND and 3RD ctx initializations are retained correctly on all three panels on first time display. However, on a subsequent page up, the DTL and 2ND ctx initializations on Detail Panel 1 and Detail Panel 2 are overwritten with value(s) from 3RD ctx initialization/Detail Panel 3 value(s) if modified, for related field(s). | |
COBOL/ILE COBOL | O | O | O | *ADD/*CHANGE | Y | Y | Y | N | The Function behaves as desired. | |
RPG/ILE RPG | I/H/O | I/H/O | I/H/O | *ADD/*CHANGE | N | N | Y | Y | A limitation is with DTL/2ND ctx initializations. 3RD ctx initialization is retained on Detail Panel 1 and Detail Panel 2, overwriting any DTL/2ND ctx initializations, for related fields. | |
DSPRCD3 | COBOL/ILE COBOL | O | O | O | *DISPLAY | Y | Y | Y | N | The Function behaves as desired. |
RPG/ILE RPG | O | O | O | *DISPLAY | N | N | Y | Y | A limitation is with DTL/2ND ctx initializations. 3RD ctx initialization is retained on Detail Panel 1 and Detail Panel 2, overwriting any DTL/2ND ctx initializations, for related fields. |
Workarounds for overcoming the limitations mentioned above
As mentioned earlier, the limitations in the EDTRCD2/EDTRCD3/DSPRCD2/DSPRCD3 functions occur when context based initialization of access path field(s) is carried out. When there is no context based initialization, the device functions work correctly.
To overcome the said limitations, the following workarounds can be used, irrespective of the language being used for function generation