CALC: Subfile control function fields are not Generated as Expected
search cancel

CALC: Subfile control function fields are not Generated as Expected

book

Article ID: 414227

calendar_today

Updated On:

Products

CA 2E

Issue/Introduction

When using the CALC: Subfile function does not generate the code to operate before and after the display of the screen. 

This behavior was seen in DSPFIL and EDTFIL.

The CALC: Subfile record function fields are correctly generating when using edtrcd.

Test setup

Model Values:

YSAAFMT  SAA format . . . . . . . . . . :   *CUAENTRY 
YCUAPMT  Enable F4/Prompt . . . . . . . :   *CALC     

RPGLE

Testing Steps 

Display File Test - Result, CALC: Subfile control function fields  only executed after display screen.

  1. Standard Display File (no extra code)
  2. PGM RP4, SQL Gen Mode
  3. 1 DRV function field, code inside is Retrieve Condition Name.  Added to CTL portion of the screen.
  4. Convert Conditions (just to be sure).
  5. Gen/Compile (no errors)
  6. On Initial screen load, field is not populated, pressing enter, field is populated.
  7. Repeat Test with DDS Gen Mode, no change.
  8. Add DRV field to subfile.
  9. Gen/Compile (no errors) 
  10. On initial screen load, subfile DRV field is populated, CTL field is not.

Edit File Test - Result, CALC: Subfile control function fields  only executed after display screen.

  1. Standard Edit File (no extra code)
  2. PGM RP4, SQL Gen Mode
  3. 1 DRV function field, code inside is Retrieve Condition Name.  Added to CTL portion of the screen.
  4. Convert Conditions (just to be sure).
  5. Gen/Compile (no errors)
  6. On Initial screen load, field is not populated, pressing enter, field is populated.
  7. Repeat Test with DDS Gen Mode, no change.
  8. Add DRV field to subfile.
  9. Gen/Compile (no errors) 
  10. On initial screen load, subfile DRV field is populated, CTL Field is not.

Environment

2E 8.7.4

Resolution

Dev-SE has generated a test fix to resolve this issue.

Please contact support for verification and to obtain this efix for your environment. 

After applying the Test PTF in r8.7.4 and upon subsequent generation of functions which have logic in the user point "CALC: Subfile control function fields", users will see a difference in the generated code.

The logic in the user point "CALC: Subfile control function fields" will now be generated prior to the Initialization user point logic, at the time of initial screen load.

To ensure that users make an informed decision on this, and to enable backwards compatibility, a new data area - YCLCCTLRFA, has been introduced.

This data area will be converted to a model value in subsequent releases.