ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

CHANGE Keyword in Display file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CHANGE Keyword in Display file

    Hi


    In display file I have placed a CHANGE keyword for subfile record and it's corresponding Control record. . If I change the fields in control record format it is the indicator of CHANGE set to On. But after changing fields of subfile record format it is not set to ON. Please help me in this regard. I want the indicator of CHANGE keyword to be set for both cases

    Thanks in advance
    Regards
    Rajesh

  • #2
    Re: CHANGE Keyword in Display file

    Ive never used that keyword...sorry anyone else?
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: CHANGE Keyword in Display file

      Hi Rajesh,

      CHNAGE Keyword has some constraints.

      This is used under the following conditions:

      The keyword is specified at the record level, and any input-capable field in the record format has its changed data tag (MDT) set on.

      The keyword is specified for an input-capable field, and that field has its changed data tag (MDT) set on.

      The MDT of an input-capable field is set on when the display station user keys into the field, or when your program selects the display attribute (DSPATR(MDT)) keyword for the output operation that displays the field.

      If the MDT is set on using the DSPATR(MDT) keyword, the data in the field might not have changed even though the MDT (and hence the response indicator specified for CHANGE) is set on.

      Also, note that the MDT is set on even if the workstation user keys the same data in the field as was initially displayed (such as typing into a blank field and then blanking the field).

      Note: The CHANGE response indicator is not set on when a command attention key (CAnn, Help, Print, Home, or Clear) is pressed.

      So if u r using CA keys and u r touching the subfile input capable field with the same values, CHANGE indicator will not be on.

      Hence pls use SFLNXTCHG keyword to track which subfile record has been changed and use READC in ur RPGLE program.
      Thanks,
      Giri

      Comment


      • #4
        Re: CHANGE Keyword in Display file

        Hi g_rajesh_aash:

        I just tried an experiment using the sub-file control with change(65) and sub-file with change(64).

        Then interesting results were when the control was modified both 64 and 65 were on. When the sub-file was modified both were off. Probably because the control record writes the subfile.

        I agree with GIRI use the SFLNXTCHG keyword.

        Best of Luck
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment

        Working...
        X