ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Move fields logic

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Move fields logic

    Hi!

    I'm fighting with Kx indicators (in the DDS they are defined as CFnn with no indicators)
    I know from RPGII (sorry but that is my background) that when you read a DSPF only the pressed function key indicator (Kx), if any, is set on and all the others are off.

    Does this apply also to RPGLE?
    What does "move fields logic" mean?

    TIA
    Arnaldo

  • #2
    Re: Move fields logic

    Originally posted by argasoft36
    Does this apply also to RPGLE?
    What does "move fields logic" mean?
    Yes, it also applies to ILE RPG.

    And "move fields logic" means just what the manual says. It's the logic that runs "when fields are extracted from the record". RPG generally doesn't give you access to record buffers. Instead, the compiler generates code that copies values from record buffers into variables that you have defined in your program (or that are inserted by the compiler from external descriptions). There is compiled logic that determines which values are copied. Similar logic runs for output records.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      Re: Move fields logic

      If you compile your program with OPTION(*DEBUGIO), and with DBGVIEW(*LIST), you can see the move-fields logic in action when you do a step in the debugger on the READ, WRITE, or EXFMT opcode. Instead of stepping to the next C spec, it will step through I specs or O specs, handling the fields one by one.

      Comment


      • #4
        Re: Move fields logic

        Hi!

        Thanks for your replies.
        I've won the Kx-fight (don't really know how: evidently my head is not running as in the younger years )

        Arnaldo

        Comment

        Working...
        X