ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Incomprehensible (for me) OVERLAY.

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

  • Incomprehensible (for me) OVERLAY.

    Hi!

    As I do not use subfile technique, I list records this way:

    a LISTMASK record (OVERLAY conditioned by indicator 99, NO CLRL) that looks like this ("_" is input field):
    Code:
      heading01 heading02 etc
    _
    _
    _
    _
    
    F-keys
    a RECLINE record (SLNO *VAR - NO CLRL - output fields conditioned by indicator 90) that looks like this ("_" is input field):
    Code:
    _ data01 data02 etc
    Program has these steps:
    - WRITE LISTMASK with condition indicator 99=OFF (should overwrite actual screen AFAIUI)
    - DO loop to WRITE RECLINE
    - WRITE LISTMASK with condition indicator 99=ON (should NOT cancel actual screen AFAIUI)

    The only overlapping fields are the input ones ("_").

    The result is that no data01 data02 etc are shown, although they are present and at time of WRITE RECLINE the field condition indicator 90 is OFF and there are data in the field (checked via STRDBG).

    Furthermore, I choose record types to list on a SELECTREC screen (lines 1-3) and LISTMASK record has SLNO(4), but on first WRITE LISTMASK lines 1-3 disappear.

    Obviously I misunderstand something: what?

    TIA
    Arnaldo

  • #2
    Re: Incomprehensible (for me) OVERLAY.

    Program has these steps:
    - WRITE LISTMASK with condition indicator 99=OFF (should overwrite actual screen AFAIUI)
    - DO loop to WRITE RECLINE
    - WRITE LISTMASK with condition indicator 99=ON (should NOT cancel actual screen AFAIUI)

    The only overlapping fields are the input ones ("_").

    The result is that no data01 data02 etc are shown, although they are present and at time of WRITE RECLINE the field condition indicator 90 is OFF and there are data in the field (checked via STRDBG).

    Furthermore, I choose record types to list on a SELECTREC screen (lines 1-3) and LISTMASK record has SLNO(4), but on first WRITE LISTMASK lines 1-3 disappear.
    First, regarding SELECTREC on lines 1-3 disappearing ... I believe that's because you've conditioned to NOT overlay the screen on your first write to LISTMASK. If a screen is not being overlayed, it will be cleared. Now, given that, if SELECTREC is from a different display file, then you'll need to make additional changes to be able to overlay it. If it's in the same display file as LISTMASK, it should work.

    Second, there will be no data01, data02 because you've written LISTMASK a second time. Even though you have overlay conditioned ON this time, since the LISTMASK record format spans above and below the data you've written, that data will be cleared out.

    I don't think there's any need for writing LISTMASK twice and it sounds like it should *always* have OVERLAY.

    (Just my 2 cents: Subfiles are simpler than what this sounds like.)

    --Bryan

    Comment

    Working...
    X